A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/mutex/adopt_lock/ below:

object

<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.

The value is a compile-time constant that carries no state, and is merely used to disambiguate between constructor signatures.

adopt_lock_t is an empty class.



See also
defer_lock
Defer lock (object)
try_to_lock
Try to lock (object)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4