unique_lock::unlock Method

Releases ownership of the associated mutex.

void unlock();

If the calling thread doesn't own the associated mutex, this method throws a system_error that has an error code of operation_not_permitted.

Otherwise, this method calls unlock on the associated mutex and sets the internal thread ownership flag to false.

Header: mutex

Namespace: std

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft