std::shared_lock<Mutex>:: operator bool
From es.cppreference.net
<
cpp
|
thread
|
shared lock
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::shared_lock
| Member functions | ||||
| Shared locking | ||||
| Modifiers | ||||
| Observers | ||||
|
shared_lock::operator bool
|
||||
| Non-member functions | ||||
|
explicit
operator
bool
(
)
const
noexcept
;
|
(desde C++14) | |
Comprueba si * this posee un mutex bloqueado o no. Efectivamente llama a owns_lock() .
Parámetros
(ninguno)
Valor de retorno
true si * this tiene un mutex asociado y ha adquirido la propiedad compartida del mismo, false en caso contrario.
Véase también
|
prueba si el lock posee su mutex asociado
(función miembro pública) |