Commit 6e98ea2a authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Rearrange SingletonThreadLocal members

Summary: [Folly] Rearrange `SingletonThreadLocal` members, moving member types above member functions.

Reviewed By: djwatson

Differential Revision: D7316143

fbshipit-source-id: c70b31935d9b5d7428bde777ea62832dc45b3971
parent 77c09b50
...@@ -60,8 +60,6 @@ template < ...@@ -60,8 +60,6 @@ template <
typename Make = detail::DefaultMake<T>> typename Make = detail::DefaultMake<T>>
class SingletonThreadLocal { class SingletonThreadLocal {
private: private:
SingletonThreadLocal() = delete;
struct Wrapper { struct Wrapper {
// keep as first field, to save 1 instr in the fast path // keep as first field, to save 1 instr in the fast path
union { union {
...@@ -96,6 +94,8 @@ class SingletonThreadLocal { ...@@ -96,6 +94,8 @@ class SingletonThreadLocal {
} }
}; };
SingletonThreadLocal() = delete;
FOLLY_EXPORT FOLLY_NOINLINE static ThreadLocal<Wrapper>& getWrapperTL() { FOLLY_EXPORT FOLLY_NOINLINE static ThreadLocal<Wrapper>& getWrapperTL() {
static auto& entry = *detail::createGlobal<ThreadLocal<Wrapper>, Tag>(); static auto& entry = *detail::createGlobal<ThreadLocal<Wrapper>, Tag>();
return entry; return entry;
......
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