template<class Lock, class Predicate>
bool wait(Lock& lock, stop_token stoken, Predicate pred);
while (!stoken.stop_requested()) { if (pred()) return true; wait(lock); } return pred();
template<class Lock, class Clock, class Duration, class Predicate>
bool wait_until(Lock& lock, stop_token stoken,
const chrono::time_point<Clock, Duration>& abs_time, Predicate pred);
while (!stoken.stop_requested()) { if (pred()) return true; if (cv.wait_until(lock, abs_time) == cv_status::timeout) return pred(); } return pred();
template<class Lock, class Rep, class Period, class Predicate>
bool wait_for(Lock& lock, stop_token stoken,
const chrono::duration<Rep, Period>& rel_time, Predicate pred);