
std::mutex::lock - cppreference.com
2023年10月22日 · Locks the mutex. If another thread has already locked the mutex, a call to lock will block execution until the lock is acquired. If lock is called by a thread that already owns the …
std::mutex - cppreference.com
2024年3月6日 · mutex offers exclusive, non-recursive ownership semantics: A calling thread owns a mutex from the time that it successfully calls either lock or try_lock until it calls unlock. When …
std::lock_guard - cppreference.com
2023年7月6日 · When a lock_guard object is created, it attempts to take ownership of the mutex it is given. When control leaves the scope in which the lock_guard object was created, the …
std::shared_mutex::lock - cppreference.com
2023年8月17日 · While shared_mutex is locked in an exclusive mode, no other lock of any kind can also be held. If lock is called by a thread that already owns the shared_mutex in any mode …
std::unique_lock - cppreference.com
2024年2月27日 · The class unique_lock is a general-purpose mutex ownership wrapper allowing deferred locking, time-constrained attempts at locking, recursive locking, transfer of lock …
std::scoped_lock - cppreference.com
2024年7月12日 · When a scoped_lock object is created, it attempts to take ownership of the mutexes it is given. When control leaves the scope in which the scoped_lock object was …
std::unique_lock<Mutex>::release - cppreference.com
2023年10月24日 · Breaks the association of the associated mutex, if any, and * this.. No locks are unlocked. If * this held ownership of the associated mutex prior to the call, the caller is now …
std::recursive_mutex - cppreference.com
2023年10月23日 · When a thread owns a recursive_mutex, all other threads will block (for calls to lock) or receive a false return value (for try_lock) if they attempt to claim ownership of the …
std::shared_mutex::lock_shared - cppreference.com
2023年8月15日 · If lock_shared is called by a thread that already owns the mutex in any mode (exclusive or shared), the behavior is undefined. If more than the implementation-defined …
std::unique_lock<Mutex>::unique_lock - cppreference.com
2023年10月24日 · 8) Tries to lock the associated mutex by calling m. try_lock_until (timeout_time). Blocks until specified timeout_time has been reached or the lock is acquired, …