Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

mozilla::Mutex

mozilla::Mutex is a bare wrapper around PRLock. Please see Introduction_to_NSPR for a high-level summary of its semantics.

#include <mozilla/Mutex.h>

Methods

Constructor

Mutex(const char* aName)

Initialize the mutex with a name that can reference it.

Lock()

Lock the mutex.

Unlock()

Unlock the mutex.

AssertCurrentThreadOwns()

Assert that the current thread has locked this mutex. Does not incur a runtime penalty in optimized builds.

AssertNotCurrentThreadOwns()

Assert that the current thread does not own this mutex. Does not incur a runtime penalty in optimized builds.

See also

 

Document Tags and Contributors

 Contributors to this page: teoli, Ted_Mielczarek, cgj
 Last updated by: teoli,