What does boost::condition_variable::timed_wait() return on spurious wakeups?
问题 The boost documentation says: Returns: false if the call is returning because the time specified by abs_time was reached, true otherwise. But what is returned if there is a spurious wakeup? 回答1: If the condition variable could figure that it is a spurious wake-up there would be no need to return, would it? You need to check if the data protected by the mutex and the condition variable has changed to detect a spurious wake-up. The condition variable can not do that for you. 来源: https:/