vendredi 29 mai 2015

Can std::this_thread::sleep_for() have spurious wakeups?

Note, this is not a question about std::condition_variable::sleep_for(). I know that can wake spuriously.

My program’s behavior suggests the answer to this question is Yes, but the STL documentation is quite clear for the condition_variable case. At least at cppreference.com, the correct answer for this_thread appears to be No.

Compiler is gcc 4.8.1, in case this is a defect.

Aucun commentaire:

Enregistrer un commentaire