A RetroSearch Logo

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

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/thread.lock.unique.locking below:

[thread.lock.unique.locking]

33 Thread support library [thread] 33.4 Mutual exclusion [thread.mutex] 33.4.4 Locks [thread.lock] 33.4.4.3 Class template unique_­lock [thread.lock.unique] 33.4.4.3.2 unique_­lock locking [thread.lock.unique.locking]

void lock();

Effects: As if by pm->lock().

Postconditions: owns == true.

Throws: Any exception thrown by pm->lock(). system_­error when an exception is required ([thread.req.exception]).

Error conditions:

bool try_lock();

Requires: The supplied Mutex shall meet the Lockable requirements.

Effects: As if by pm->try_­lock().

Returns: The value returned by the call to try_­lock().

Postconditions: owns == res, where res is the value returned by the call to try_­lock().

Throws: Any exception thrown by pm->try_­lock(). system_­error when an exception is required ([thread.req.exception]).

Error conditions:

template <class Clock, class Duration> bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);

Requires: The supplied Mutex type shall meet the TimedLockable requirements.

Effects: As if by pm->try_­lock_­until(abs_­time).

Returns: The value returned by the call to try_­lock_­until(abs_­time).

Postconditions: owns == res, where res is the value returned by the call to try_­lock_­until(abs_­time).

Throws: Any exception thrown by pm->try_­lock_­until(). system_­error when an exception is required ([thread.req.exception]).

Error conditions:

template <class Rep, class Period> bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);

Requires: The supplied Mutex type shall meet the TimedLockable requirements.

Effects: As if by pm->try_­lock_­for(rel_­time).

Returns: The value returned by the call to try_­lock_­until(rel_­time).

Postconditions: owns == res, where res is the value returned by the call to try_­lock_­for(rel_­time).

Throws: Any exception thrown by pm->try_­lock_­for(). system_­error when an exception is required ([thread.req.exception]).

Error conditions:

void unlock();

Effects: As if by pm->unlock().

Postconditions: owns == false.

Error conditions:


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