std::recursive_timed_mutex::unlock
STD::递归[医]定时[医]互斥::解锁
void unlock( | | (since C++11) |
---|
如果互斥锁的所有权级别为1
%28准确地说,还有一个呼叫lock()
比有人打电话到unlock()
由此线程%29生成,否则会降低1
的所有权级别。
互斥锁必须由当前的执行线程锁定,否则,行为是未定义的。
这次行动同步性
中定义的28名ASstd::memory_order
%29获得相同互斥对象所有权的任何后续锁操作。
参数
%280%29
返回值
%280%29
例外
%280%29
注记
unlock()
通常不直接调用:std::unique_lock
和std::lock_guard
用于管理独占锁定。
例
另见
lock | locks the mutex, blocks if the mutex is not available (public member function) |
---|---|
try_lock | tries to lock the mutex, returns if the mutex is not available (public member function) |
try_lock_for | tries to lock the mutex, returns if the mutex has beenunavailable for the specified timeout duration (public member function) |
try_lock_until | tries to lock the mutex, returns if the mutex has beenunavailable until specified time point has been reached (public member function) |
c MTX文件[医]解锁
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。