问题
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://stackoverflow.com/questions/4669995/what-does-boostcondition-variabletimed-wait-return-on-spurious-wakeups