Namespaces
Variants

std::shared_mutex:: unlock_shared

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
void unlock_shared ( ) ;
(C++17부터)

호출 스레드에 의한 공유 소유권에서 뮤텍스를 해제합니다.

뮤텍스는 현재 실행 스레드에 의해 공유 모드로 잠겨 있어야 하며, 그렇지 않을 경우 동작은 정의되지 않습니다.

이 연산은 동일한 뮤텍스의 소유권을 획득하는 이후의 std::memory_order 에 정의된 대로 synchronizes-with 합니다. lock() 연산과

목차

매개변수

(없음)

반환값

(없음)

예외

아무것도 던지지 않습니다.

참고 사항

unlock_shared() 는 일반적으로 직접 호출되지 않습니다: std::shared_lock 이 공유 잠금을 관리하는 데 사용됩니다.

예제

참고 항목

뮤텍스를 공유 소유권으로 잠금, 뮤텍스를 사용할 수 없는 경우 차단
(public member function)
뮤텍스를 잠금 해제
(public member function)