MCPcopy Create free account
hub / github.com/apache/brpc / cv_mutex_waiter_with_pred

Function cv_mutex_waiter_with_pred

test/bthread_cond_unittest.cpp:183–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183void* cv_mutex_waiter_with_pred(void* void_arg) {
184 WrapperArg* a = (WrapperArg*)void_arg;
185 std::unique_lock<bthread::Mutex> lck(a->mutex);
186 a->cond.wait(lck, [&] { return a->ready; });
187 WrapperArg::wake_time.fetch_add(1);
188 return NULL;
189}
190
191#define COND_IN_PTHREAD
192

Callers

nothing calls this directly

Calls 2

fetch_addMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected