stduniquelockstdsharedmutex
std::unique_lock is a class template in the C++ Standard Library that provides a convenient and exception-safe mechanism for managing mutex ownership. It is defined in the <mutex> header file. std::unique_lock is a move-only type, meaning that it cannot be copied but can be moved. This makes it suitable for use in scenarios where ownership of a mutex needs to be transferred between different scopes or functions.
The primary purpose of std::unique_lock is to ensure that a mutex is properly locked and unlocked, even
std::unique_lock provides several member functions for managing the mutex, including lock, try_lock, unlock, and swap. It
std::unique_lock is typically used in conjunction with std::mutex and other synchronization primitives to protect shared data