[thread.lock.unique.locking] (original) (raw)

32 Concurrency support library [thread]

32.6 Mutual exclusion [thread.mutex]

32.6.5 Locks [thread.lock]

32.6.5.4 Class template unique_lock [thread.lock.unique]

32.6.5.4.3 Locking [thread.lock.unique.locking]

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

Postconditions: owns == true.

Throws: Any exception thrown by pm->lock().

Error conditions:

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

Postconditions: owns == res, where res is the value returned bypm->try_lock().

Returns: The value returned by pm->try_lock().

Throws: Any exception thrown by pm->try_lock().

Error conditions:

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

Effects: As if by pm->try_lock_until(abs_time).

Postconditions: owns == res, where res is the value returned bypm->try_lock_until(abs_time).

Returns: The value returned by pm->try_lock_until(abs_time).

Throws: Any exception thrown by pm->try_lock_until(abstime).

Error conditions:

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

Effects: As if by pm->try_lock_for(rel_time).

Postconditions: owns == res, where res is the value returned by pm->try_lock_for(rel_time).

Returns: The value returned by pm->try_lock_for(rel_time).

Throws: Any exception thrown by pm->try_lock_for(rel_time).

Error conditions:

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

Postconditions: owns == false.

Error conditions: