[thread.lock.shared.locking] (original) (raw)
32 Concurrency support library [thread]
32.6 Mutual exclusion [thread.mutex]
32.6.5 Locks [thread.lock]
32.6.5.5 Class template shared_lock [thread.lock.shared]
32.6.5.5.3 Locking [thread.lock.shared.locking]
Effects: As if by pm->lock_shared().
Postconditions: owns == true.
Throws: Any exception thrown by pm->lock_shared().
Error conditions:
- operation_not_permitted — if pm is nullptr.
- resource_deadlock_would_occur — if on entry owns istrue.
Effects: As if by pm->try_lock_shared().
Postconditions: owns == res, where res is the value returned by the call to pm->try_lock_shared().
Returns: The value returned by the call to pm->try_lock_shared().
Throws: Any exception thrown by pm->try_lock_shared().
Error conditions:
- operation_not_permitted — if pm is nullptr.
- resource_deadlock_would_occur — if on entry owns istrue.
Effects: As if by pm->try_lock_shared_until(abs_time).
Postconditions: owns == res, where res is the value returned by the call to pm->try_lock_shared_until(abs_time).
Returns: The value returned by the call topm->try_lock_shared_until(abs_time).
Throws: Any exception thrown by pm->try_lock_shared_until(abs_time).
Error conditions:
- operation_not_permitted — if pm is nullptr.
- resource_deadlock_would_occur — if on entry owns istrue.
Effects: As if by pm->try_lock_shared_for(rel_time).
Postconditions: owns == res, where res is the value returned by the call to pm->try_lock_shared_for(rel_time).
Returns: The value returned by the call to pm->try_lock_shared_for(rel_time).
Throws: Any exception thrown by pm->try_lock_shared_for(rel_time).
Error conditions:
- operation_not_permitted — if pm is nullptr.
- resource_deadlock_would_occur — if on entry owns istrue.
Effects: As if by pm->unlock_shared().
Postconditions: owns == false.
Error conditions:
- operation_not_permitted — if on entry owns isfalse.