物件
<mutex>

std::adopt_lock

constexpr adopt_lock_t adopt_lock {};
Adopt lock
Value used as possible argument to the constructor of unique_lock or lock_guard.

unique_lock objects constructed with adopt_lock do not lock the mutex object on construction, assuming instead that it is already locked by the current thread.

該值是一個編譯時常量,不攜帶任何狀態,僅用於區分建構函式簽名。

adopt_lock_t is an empty class.

另見