Namespaces
Variants

std::unique_lock<Mutex>:: release

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
mutex_type * release ( ) noexcept ;
(自 C++11 起)

解除关联互斥锁(如果存在)与 * this 的关联关系。

没有锁被解锁。如果 * this 在调用前持有相关互斥锁的所有权,调用方现在需要负责解锁该互斥锁。

目录

参数

(无)

返回值

指向关联互斥量的指针,若无关联互斥量则为空指针。

示例

另请参阅

解锁(即释放所有权)关联的互斥锁
(公开成员函数)