Difference between revisions of "cpp/thread/cv status"
From cppreference.com
m (Use since= and until= params of {{dcl}} template.) |
Quuxplusone (Talk | contribs) (order the constants by numeric value; give values in synopsis) |
||
Line 4: | Line 4: | ||
{{dcl header | condition_variable}} | {{dcl header | condition_variable}} | ||
{{dcl | since=c++11 | 1= | {{dcl | since=c++11 | 1= | ||
− | enum class cv_status; | + | enum class cv_status { |
+ | timeout = 0, | ||
+ | no_timeout = 1 | ||
+ | }; | ||
}} | }} | ||
{{dcl end}} | {{dcl end}} | ||
Line 15: | Line 18: | ||
{{dsc begin}} | {{dsc begin}} | ||
{{dsc hitem | Constant | Explanation}} | {{dsc hitem | Constant | Explanation}} | ||
− | |||
{{dsc | {{tt|timeout}} | the condition variable was awakened by timeout expiration }} | {{dsc | {{tt|timeout}} | the condition variable was awakened by timeout expiration }} | ||
+ | {{dsc | {{tt|no_timeout}} | the condition variable was awakened with {{tt|notify_all}}, {{tt|notify_one}}, or spuriously }} | ||
{{dsc end}} | {{dsc end}} | ||
Revision as of 14:43, 30 August 2017
Defined in header <condition_variable>
|
||
enum class cv_status { timeout = 0, |
(since C++11) | |
The scoped enumeration std::cv_status
describes whether a timed wait returned because of timeout or not.
std::cv_status
is used by the wait_for
and wait_until
methods of std::condition_variable and std::condition_variable_any.
Member constants
Constant | Explanation |
timeout
|
the condition variable was awakened by timeout expiration |
no_timeout
|
the condition variable was awakened with notify_all , notify_one , or spuriously
|
See also
blocks the current thread until the condition variable is awakened or after the specified timeout duration (public member function of std::condition_variable )
| |
blocks the current thread until the condition variable is awakened or after the specified timeout duration (public member function of std::condition_variable_any )
| |
blocks the current thread until the condition variable is awakened or until specified time point has been reached (public member function of std::condition_variable )
| |
blocks the current thread until the condition variable is awakened or until specified time point has been reached (public member function of std::condition_variable_any )
|