std::shared_lock<Mutex>::operator bool
來自 cppreference.com
< cpp | thread | shared_lock
explicit operator bool() const noexcept; |
(C++14 起) | |
檢查 *this 是否擁有一把已鎖定的互斥鎖。它實際上呼叫 owns_lock()。
[edit] 引數
(無)
[edit] 返回值
如果 *this 關聯了一個互斥鎖並已獲得其共享所有權,則返回 true,否則返回 false。
[edit] 參見
測試鎖是否擁有其關聯的互斥體 (public member function) |