Note that this is not a question about std::condition_variable::wait_for() . I know I can wake up falsely.
My behavior in the program suggests that the answer to this question is Yes, but the STL document is understandable for the condition_variable case. At least on cppreference.com , the correct answer for this_thread looks like No.
The gcc 4.8.1 compiler if this is a defect.
c ++ sleep c ++ 11 stl thread-sleep
Andrew Lazarus
source share