BloombergLP::bslmt::Once::cancel

Revert this object to the state it was in before enter or callOnce was called, then unlock the internal mutex using the specified onceLock (possibly unblocking pending calls to enter or callOnce). This method may only be used to cancel execution of one-time code that has not yet completed. The behavior is undefined unless onceLock was locked by a matching call to enter on this object and has not been tampered-with since (especially by calling leave).

Synopsis

Declared in <bslmt_once.h>

void
cancel(OnceLock* onceLock);