MCPcopy Create free account
hub / github.com/apache/impala / WaitFor

Method WaitFor

be/src/util/condition-variable.h:64–68  ·  view source on GitHub ↗

Wait until the condition variable is notified or 'duration_us' microseconds have passed. Returns true if the condition variable is notified in time. Returns false otherwise.

Source from the content-addressed store, hash-verified

62 /// have passed. Returns true if the condition variable is notified in time.
63 /// Returns false otherwise.
64 bool WaitFor(std::unique_lock<std::mutex>& lock, int64_t duration_us) {
65 timespec deadline;
66 TimeFromNowMicros(duration_us, &deadline);
67 return WaitUntil(lock, deadline);
68 }
69
70 /// Notify a single waiter on this condition variable.
71 void NotifyOne() { pthread_cond_signal(&cv_); }

Callers 1

PromiseClass · 0.45

Calls 1

TimeFromNowMicrosFunction · 0.85

Tested by

no test coverage detected