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

std::shared_lock::unlock

STD::共享[医]锁::解锁

void unlock((since C++14)

从共享模式中解锁关联的互斥锁。有效呼叫mutex()->unlock_shared()...

std::system_error如果没有关联的互斥对象,或者互斥锁未被锁定,则引发。

参数

%280%29

返回值

%280%29

例外

  • 引发的任何异常mutex()->unlock_shared()

  • 如果没有关联的互斥,std::system_error错误代码为std::errc::operation_not_permitted

另见

locklocks the associated mutex (public member function)
releasedisassociates the mutex without unlocking (public member function)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/线程/Shared[医]锁/解锁