Commit 7ce27feb authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Use SingletonThreadLocal for the current fiber manager

Summary: [Folly] Use SingletonThreadLocal for the current fiber manager, which does not depend on whether `__thread` or `thread_local` is available.

Reviewed By: andriigrynenko

Differential Revision: D19229511

fbshipit-source-id: a92016aca89205c2842dc4f71054b1b6306b14b9
parent 5bdf434f
......@@ -83,8 +83,8 @@ auto FiberManager::FrozenOptions::create(const Options& options) -> ssize_t {
}
/* static */ FiberManager*& FiberManager::getCurrentFiberManager() {
static FOLLY_TLS FiberManager* currentFiberManager;
return currentFiberManager;
struct Tag {};
return SingletonThreadLocal<FiberManager*, Tag>::get();
}
FiberManager::FiberManager(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment