MCPcopy Create free account
hub / github.com/acl-dev/acl / wait

Method wait

lib_fiber/cpp/src/fiber_cond.cpp:17–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17bool fiber_cond::wait(fiber_mutex& mutex, int timeout /* = -1 */)
18{
19 ACL_FIBER_MUTEX* m = mutex.get_mutex();
20
21 if (timeout < 0) {
22 return acl_fiber_cond_wait(cond_, m) == 0;
23 }
24
25 if (acl_fiber_cond_timedwait(cond_, m, timeout) == 0) {
26 return true;
27 } else {
28 return false;
29 }
30}
31
32bool fiber_cond::notify()
33{

Callers

nothing calls this directly

Calls 3

acl_fiber_cond_waitFunction · 0.85
acl_fiber_cond_timedwaitFunction · 0.85
get_mutexMethod · 0.80

Tested by

no test coverage detected