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
// Mark registration is complete; no more singletons can be
// registered at this point.
void registrationComplete() {
+ scheduleDestroyInstances();
+
RWSpinLock::WriteHolder wh(&stateMutex_);
stateCheck(SingletonVaultState::Running);