Search:
Reference
<mutex>
timed_mutex
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 type
description
native_handle_type
Type 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 )
C++
Information
Tutorials
Reference
Articles
Forum
Reference
C library:
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
<cfenv> (fenv.h)
<cfloat> (float.h)
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
<ctgmath> (tgmath.h)
<ctime> (time.h)
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
Containers:
<array>
<deque>
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
<unordered_map>
<unordered_set>
<vector>
Input/Output:
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
Multi-threading:
<atomic>
<condition_variable>
<future>
<mutex>
<thread>
Other:
<algorithm>
<bitset>
<chrono>
<codecvt>
<complex>
<exception>
<functional>
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
<random>
<ratio>
<regex>
<stdexcept>
<string>
<system_error>
<tuple>
<typeindex>
<typeinfo>
<type_traits>
<utility>
<valarray>
<mutex>
classes:
adopt_lock_t
defer_lock_t
lock_guard
mutex
once_flag
recursive_mutex
recursive_timed_mutex
timed_mutex
try_to_lock_t
unique_lock
functions:
call_once
lock
try_lock
constants:
adopt_lock
defer_lock
try_to_lock
timed_mutex
timed_mutex::timed_mutex
timed_mutex::~timed_mutex
member functions:
timed_mutex::lock
timed_mutex::native_handle
timed_mutex::try_lock
timed_mutex::try_lock_for
timed_mutex::try_lock_until
timed_mutex::unlock