C++
线程支持 | Thread support

std::unique_lock::unlock

性病::独特[医]锁::解锁

void unlock((since C++11)

解锁相关互斥锁并释放所有权。

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

参数

%280%29

返回值

%280%29

例外

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

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

另见

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

© cppreference.com

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

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