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

std::timed_mutex::unlock

STD::定时[医]互斥::解锁

void unlock((since C++11)

打开互斥锁。

互斥锁必须由当前的执行线程锁定,否则,行为是未定义的。

这次行动同步性中定义的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/线程/timeed[医]互斥/解锁