std::shared_lock<Mutex>::operator bool
来自 cppreference.cn
< cpp | thread | shared_lock
explicit operator bool() const noexcept; |
(C++14 起) | |
检查 *this 是否拥有一把已锁定的互斥锁。它实际上调用 owns_lock()。
[edit] 参数
(无)
[edit] 返回值
如果 *this 关联了一个互斥锁并已获得其共享所有权,则返回 true,否则返回 false。
[edit] 参见
测试锁是否拥有其关联的互斥体 (public member function) |