Fix fork behavior
Summary: hazptr_priv_list needs to be reinitialized on fork, as well as ODR violations. This broke stuff when trying to land D7164130 TL;DR the thread_locals need to be in a .cpp file, the templates don't always get merged correctly, especially in the face of dlopen. You can, however, use a thread_local * pointer cache to the object. This is basically what folly::SingletonThreadLocal does. Folly's ThreadLocal runs destructors when forking even too, so nothing special is required. Reviewed By: yfeldblum Differential Revision: D7256905 fbshipit-source-id: c817167b5c3db27fa929feaa39295fd939c1cb4c
Showing
Please register or sign in to comment