std::shared_lock<Mutex>::operator=

< cpp‎ | thread‎ | shared lock
shared_lock& operator=( shared_lock&& other ) noexcept;
(C++14 起)

移动赋值运算符。用移动语义以 other 的内容替换内容。

若在此调用前 *this 拥有关联的互斥( mutex() 返回非空指针且)且获得了其所有权( owns() 返回 true ),则通过调用 unlock_shared() 解锁互斥。

此调用后, other 无关联的互斥。


参数

other - 用以替换状态的另一 shared_lock

返回值

*this