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

Method WaitUntil

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

Wait until the condition variable is notified or 'abs_time' has passed. Returns true if the condition variable is notified before the absolute timeout specified in 'abs_time' has passed. Returns false otherwise.

Source from the content-addressed store, hash-verified

53 /// Returns true if the condition variable is notified before the absolute timeout
54 /// specified in 'abs_time' has passed. Returns false otherwise.
55 bool WaitUntil(std::unique_lock<std::mutex>& lock, const timespec& abs_time) {
56 DCHECK(lock.owns_lock());
57 pthread_mutex_t* mutex = lock.mutex()->native_handle();
58 return pthread_cond_timedwait(&cv_, mutex, &abs_time) == 0;
59 }
60
61 /// Wait until the condition variable is notified or 'duration_us' microseconds
62 /// have passed. Returns true if the condition variable is notified in time.

Callers 1

Calls 2

owns_lockMethod · 0.80
mutexMethod · 0.45

Tested by

no test coverage detected