Repeat a loop continuously, potentially using the system to pause or reschedule the thread, until this object is unlocked, then atomically acquire the lock. The spinning has backoff logic. Note that this method is recommended when system calls are permissible, significant contention is expected, and no better mutual exclusion primitive is available.

Synopsis

Declared in <bsls_spinlock.h>

void
lockWithBackoff();

Created with MrDocs