Documentation Home >> Headers >> <mutex> Header >> std::unique_lock >> std::unique_lock::unlock Member Function

Releases a lock on the mutex associated with *this.

void unlock();

Preconditions:

this->mutex()!=NULL, this->owns_lock()==true.

Effects:

Calls this->mutex()->unlock().

Throws:

Any exceptions thrown by this->mutex()->unlock(). std::system_error with an error code of std::errc::operation_not_permitted if this->owns_lock()==false on entry.

Postcondition:

this->owns_lock()==false.

Header

#include <mutex>

See Also