Documentation Home

Return the mutex associated with *this if any, and release that association.

mutex_type* release();

Effects:

Breaks the association of the mutex with *this without unlocking any locks held.

Returns:

A pointer to the mutex associated with *this prior to the call if any, NULL otherwise.

Postconditions:

this->mutex()==NULL, this->owns_lock()==false.

Throws:

Nothing.

Note:

If this->owns_lock() would have returned true prior to the call, the caller is now responsible for unlocking the mutex.

Header

#include <shared_mutex>

See Also