Difference between revisions of "cpp/thread/timed mutex"
From cppreference.com
(use {{ltf}}) |
m (Shorten template names. Use {{lc}} where appropriate.) |
||
Line 12: | Line 12: | ||
===Member types=== | ===Member types=== | ||
− | {{ | + | {{dsc begin}} |
− | {{ | + | {{dsc hitem | Member type | Definition}} |
− | {{ | + | {{dsc | {{tt|native_handle_type}} | ''implementation-defined''}} |
− | {{ | + | {{dsc end}} |
===Member functions=== | ===Member functions=== | ||
− | {{ | + | {{dsc begin}} |
− | {{ | + | {{dsc inc | cpp/thread/mutex/dcl list constructor | timed_mutex}} |
− | {{ | + | {{dsc h2 | Locking}} |
− | {{ | + | {{dsc inc | cpp/thread/mutex/dcl list lock | timed_mutex}} |
− | {{ | + | {{dsc inc | cpp/thread/mutex/dcl list try_lock | timed_mutex}} |
− | {{ | + | {{dsc inc | cpp/thread/mutex/dcl list try_lock_for | timed_mutex}} |
− | {{ | + | {{dsc inc | cpp/thread/mutex/dcl list try_lock_until | timed_mutex}} |
− | {{ | + | {{dsc inc | cpp/thread/mutex/dcl list unlock | timed_mutex}} |
− | {{ | + | {{dsc h2 | Native handle}} |
− | {{ | + | {{dsc inc | cpp/thread/mutex/dcl list native_handle | timed_mutex}} |
− | {{ | + | {{dsc end}} |
[[de:cpp/thread/timed mutex]] | [[de:cpp/thread/timed mutex]] |
Revision as of 20:03, 31 May 2013
Defined in header <mutex>
|
||
class timed_mutex; |
(since C++11) | |
The timed_mutex
class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads.
In a manner similar to mutex, timed_mutex
offers exclusive, non-recursive ownership semantics. In addition, timed_mutex
provides the ability to attempt to claim ownership of a timed_mutex
with a timeout via the try_lock_for() and try_lock_until() methods.
The timed_mutex
class is non-copyable.
Contents |
Member types
Member type | Definition |
native_handle_type
|
implementation-defined |