std::shared_lock<Mutex>:: unlock
From cppreference.net
<
cpp
|
thread
|
shared lock
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::shared_lock
| Member functions | ||||
| Shared locking | ||||
|
shared_lock::unlock
|
||||
| Modifiers | ||||
| Observers | ||||
| Non-member functions | ||||
|
void
unlock
(
)
;
|
(自 C++14 起) | |
从共享模式解锁关联的互斥锁。实际调用 mutex ( ) - > unlock_shared ( ) 。
std::system_error 会在没有关联互斥锁或互斥锁未被锁定时抛出。
目录 |
参数
(无)
返回值
(无)
异常
- 由 mutex ( ) - > unlock_shared ( ) 抛出的任何异常。
- 如果没有关联的互斥锁,将抛出 std::system_error ,其错误代码为 std::errc::operation_not_permitted 。
示例
|
本节内容不完整
原因:缺少示例 |
参见
|
锁定关联的互斥锁
(公开成员函数) |
|
|
解除关联互斥锁但不解锁
(公开成员函数) |