Std :: future :: wait_for spurious wakeup?

std::condition_variable::wait_for accepts an optional predicate for internal processing of false awakenings. std::future::wait_for does not have such optional arguments. Is something that I need to protect is a false awakening if I want me to wait at least as long as the specified timeout, or is it already being processed in some other way?

+6
source share
1 answer

Only variable conditions can wake up "falsely." Apparently, resolving false awakenings simplifies the implementation of variable conditions on some systems. (C ++ Programming Language 4th ed.)

+2
source

Source: https://habr.com/ru/post/981467/


All Articles