Commit 05fbb13d authored by Andrii Grynenko's avatar Andrii Grynenko Committed by dcsommer

Schedule destroyInstances in registrationComplete

Summary: This makes it more likely that SingletonVaultDestructor won't be created after atexit calls.

Test Plan: unit test

Reviewed By: chip@fb.com

Subscribers: hphp-diffs@, ps, njormrod, folly-diffs@

FB internal diff: D1629804

Tasks: 5353022
parent fd915b73
......@@ -208,6 +208,8 @@ class SingletonVault {
// Mark registration is complete; no more singletons can be
// registered at this point.
void registrationComplete() {
scheduleDestroyInstances();
RWSpinLock::WriteHolder wh(&stateMutex_);
stateCheck(SingletonVaultState::Running);
......
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