Reference

class
<mutex>

std::timed_mutex

class timed_mutex;
Timed mutex class
A timed mutex is a time lockable object that is designed to signal when critical sections of code need exclusive access, just like a regular mutex , but additionally supporting timed try-lock requests.

As such, a timed_mutex has two additional members: try_lock_for and try_lock_until .

It is guaranteed to be a standard-layout class.

Member types

member typedescription
native_handle_typeType returned by native_handle (only defined if library implementation supports it)

Member functions

(constructor)
Construct timed_mutex (public member function)
lock
Lock timed mutex (public member function)
try_lock
Lock timed mutex if not locked (public member function)
try_lock_for
Try to lock for time span (public member function)
try_lock_until
Try to lock until time point (public member function)
unlock
Unlock timed mutex (public member function)
native_handle
Get native handle (public member function)

AltStyle によって変換されたページ (->オリジナル) /