A RetroSearch Logo

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

Search Query:

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

public member function

<mutex>

std::recursive_timed_mutex::lock

Lock recursive timed mutex

The calling thread locks the recursive_timed_mutex, blocking if necessary (it behaves exactly as in recursive_mutex):


All lock and unlock operations on the recursive_timed_mutex follow a single total order, with all visible effects synchronized between the lock operations and previous unlock operations on the same object.

Note that the order in which different concurrent locks are scheduled to return is unspecified, and not necessarily related to the order in which they are locked (depending on the system and library implementation).



Parameters none

Return value none

Data races The recursive_timed_mutex object is modified as an atomic operation (causing no data races).

Exception safetyBasic guarantee: if an exception is thrown by this member function, the recursive_timed_mutex object is left in a valid state. Further, a lock is never acquired by the thread that made the throwing call.

If the call fails, a system_error exception is thrown:


Depending on the library implementation, this member function may also throw exceptions to report other situations.

See also
recursive_timed_mutex::try_lock
Lock recursive timed mutex if not locked (public member function)
recursive_timed_mutex::try_lock_for
Try to lock for time span (public member function)
recursive_timed_mutex::try_lock_until
Try to lock until time point (public member function)
recursive_timed_mutex::unlock
Unlock timed mutex (public member function)

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