The SharedTimedMutex requirements extend the TimedMutex requirements to include shared lock ownership mode.
[edit] RequirementsAdditionally, an object m
of SharedTimedMutex type supports timed shared operations:
duration
. If duration
is less or equal duration.zero()
, attempts to obtain the ownership without waiting (as if by try_lock()
). Otherwise, this function blocks until the mutex is acquired or until the time specified by duration
passes. It returns within duration
only if it succeeds, but it allowed to fail to acquire the mutex even if at some point in time during duration
it was not owned by another thread. In any case, it returns true if the mutex was acquired and false otherwise.try_lock_shared_for(duration)
succeeds, prior unlock()
operations on the same object synchronize-with this operation (equivalent to release-acquire std::memory_order).time_point
. If time_point
already passed, attempts to obtain the ownership without locking (as if by try_lock()
). Otherwise, this function blocks until the mutex is acquired or until the time specified by time_point
passes. It returns before time_point
only if it succeeds, but it allowed to fail to acquire the mutex even if at some point in time before time_point
it was not owned by another thread. In any case, it returns true if the mutex was acquired and false otherwise.try_lock_shared_until(time_point)
succeeds, prior unlock()
operations on the same object synchronize-with this operation (equivalent to release-acquire std::memory_order).The following standard library types satisfy SharedTimedMutex requirements:
provides shared mutual exclusion facility and implements locking with a timeoutRetroSearch 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