std::shared_lock<Mutex>::operator=

来自cppreference.com
< cpp‎ | thread‎ | shared lock
 
 
并发支持库
线程
(C++11)
(C++20)
(C++20)
this_thread 命名空间
(C++11)
(C++11)
(C++11)
互斥
(C++11)
(C++11)  
通用锁管理
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
条件变量
(C++11)
信号量
闩与屏障
(C++20)
(C++20)
未来体
(C++11)
(C++11)
(C++11)
(C++11)
安全回收
(C++26)
(C++26)
风险指针





原子类型
(C++11)
(C++20)
原子类型的初始化
(C++11)(C++20 中弃用)
(C++11)(C++20 中弃用)
内存定序
原子操作的自由函数
原子标志的自由函数
 
 
shared_lock& operator=( shared_lock&& other ) noexcept;
(C++14 起)

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

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

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


参数

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

返回值

*this