在线文档教程
C++
线程支持 | Thread support

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_lockstd::lock_guard用于管理独占锁定。

另见

locklocks the mutex, blocks if the mutex is not available (public member function)
try_locktries to lock the mutex, returns if the mutex is not available (public member function)
try_lock_fortries to lock the mutex, returns if the mutex has beenunavailable for the specified timeout duration (public member function)
try_lock_untiltries 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。

http://en.cpPreference.com/w/cpp/线程/递归[医]定时[医]互斥/解锁