void lock();
exception type | error condition | description |
---|---|---|
system_error | errc::resource_deadlock_would_occur | A deadlock was detected (implementations may detect certain cases of deadlock). |
system_error | errc::operation_not_permitted | The thread does not have privileges to perform the operation. |
system_error | errc::device_or_resource_busy | The native handle type manipulated is already locked. |