MCPcopy Create free account
hub / github.com/LUX-Core/lux / wait_for

Method wait_for

src/config/condition_variable.hpp:399–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397
398 template <class Rep, class Period>
399 cv_status
400 wait_for(
401 unique_lock<mutex>& lock,
402 const chrono::duration<Rep, Period>& d)
403 {
404 using namespace chrono;
405 if (d<=chrono::duration<Rep, Period>::zero()) {
406 return cv_status::timeout;
407 }
408
409 steady_clock::time_point c_now = steady_clock::now();
410 do_wait(lock, ceil<milliseconds>(d).count());
411 return steady_clock::now() - c_now < d ? cv_status::no_timeout :
412 cv_status::timeout;
413 }
414
415 template <class Clock, class Duration, class Predicate>
416 bool

Callers 6

waitforlogsFunction · 0.45
StopHTTPServerFunction · 0.45
waitClientCloseMethod · 0.45
doWorkMethod · 0.45
waitMethod · 0.45
waitNotMethod · 0.45

Calls 2

wait_untilFunction · 0.50
countMethod · 0.45

Tested by

no test coverage detected