folly: ThreadLocalDetail: make PthreadKeyUnregister constexpr-constructible, avoid...
authorSteve O'Brien <steveo@fb.com>
Wed, 2 Dec 2015 14:06:32 +0000 (06:06 -0800)
committerfacebook-github-bot-0 <folly-bot@fb.com>
Wed, 2 Dec 2015 14:20:18 +0000 (06:20 -0800)
commit4140f48344933306a7af761e3371cac9c719786d
treeda4dba800cc70878753c7df8178a5de22131ee6d
parent266ccb57e47f51a43dd01e19abcf7ec568b07d17
folly: ThreadLocalDetail: make PthreadKeyUnregister constexpr-constructible, avoid SIOF

Summary:
Since this is used in so many places during the program's static-initialization (at startup), this class itself could be (has been demonstrated to be) a point of SIOF problems itself.

Made this class constexpr-constructible, so it doesn't need to be part of static initialization, making it SIOF-proof.

Reviewed By: luciang

Differential Revision: D2709231

fb-gh-sync-id: f248c9f2848c09045e000cfdc03636d847e522c9
folly/detail/ThreadLocalDetail.cpp
folly/detail/ThreadLocalDetail.h
folly/test/ThreadLocalTest.cpp