Add MAX_STATIC_CONSTRUCTOR_PRIORITY to PthreadKeyUnregister
authorAndrii Grynenko <andrii@fb.com>
Thu, 11 Feb 2016 02:02:27 +0000 (18:02 -0800)
committerfacebook-github-bot-0 <folly-bot@fb.com>
Thu, 11 Feb 2016 02:20:26 +0000 (18:20 -0800)
commit4dc763b4e7188371c97bb3da3af0808e492ed7e6
tree2b35d634a2d4b3c866b1f61b71e20d0492083dad
parent1952f6b7408e8a131ad58bd9eadf1f4dd2decd6f
Add MAX_STATIC_CONSTRUCTOR_PRIORITY to PthreadKeyUnregister

Summary: We want onThreadExit to be canceled as late as possible. Otherwise accessAllThreads() may crash on shutdown (because ThreadEntry is destroyed, but not removed from the global list).

Reviewed By: igorsugak

Differential Revision: D2923435

fb-gh-sync-id: 3a8eef05844bb547c06db33cb96734df1169852a
shipit-source-id: 3a8eef05844bb547c06db33cb96734df1169852a
folly/detail/ThreadLocalDetail.cpp