folly Singleton: clear some state if creator function fails
Summary: The creator thread ID is saved to indicate the singleton is already being built (to help detect dependency cycles). However if the creation function throws an error, that thread ID persists, and then if the same thread tries again to build the singleton it will be falsely detected as a dependency cycle. This clears that state in the case of failure. Reviewed By: @chipturner Differential Revision: D2256441
Showing
Please register or sign in to comment