Return the mutex associated with *this if any, and release that association.
mutex_type* release();
- Effects:
Breaks the association of the mutex with
*thiswithout unlocking any locks held.- Returns:
A pointer to the mutex associated with
*thisprior to the call if any,NULLotherwise.- Postconditions:
this->mutex()==NULL,this->owns_lock()==false.- Throws:
Nothing.
- Note:
If
this->owns_lock()would have returnedtrueprior to the call, the caller is now responsible for unlocking the mutex.
Header
#include <mutex>