std::shared_lock<Mutex>::operator=
来自cppreference.com
< cpp | thread | shared lock
并发支持库
|
|
std::shared_lock
成员函数 | ||||
shared_lock::operator=
|
||||
共享锁定 | ||||
修改器 | ||||
观察器 | ||||
非成员函数 | ||||
shared_lock&
operator=(
shared_lock&&
other )
noexcept;
|
(C++14 起) | |
移动赋值运算符。用移动语义以 other
的内容替换内容。
若在此调用前 *this 拥有关联的互斥( mutex() 返回非空指针且)且获得了其所有权( owns() 返回 true ),则通过调用 unlock_shared() 解锁互斥。
此调用后, other
无关联的互斥。
参数
other | - | 用以替换状态的另一 shared_lock
|
返回值
*this