Mutexes and scoped locks should not be confused, but somehow std::unique_lock::owns_lock
"tests whether the lock owns its associated mutex" (quoting cppreference.com).
A lock on a mutex owning a lock doesn't make sense. Why hasn't the standard called this owns_mutex
or is_locked
?
Aucun commentaire:
Enregistrer un commentaire