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

Function cv_signaler

test/bthread_cond_unittest.cpp:146–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144std::atomic<int> WrapperArg::wake_time{0};
145
146void* cv_signaler(void* void_arg) {
147 WrapperArg* a = (WrapperArg*)void_arg;
148 signal_start_time = butil::gettimeofday_us();
149 while (!stop) {
150 bthread_usleep(SIGNAL_INTERVAL_US);
151 a->cond.notify_one();
152 }
153 return NULL;
154}
155
156void* cv_bmutex_waiter(void* void_arg) {
157 WrapperArg* a = (WrapperArg*)void_arg;

Callers

nothing calls this directly

Calls 3

bthread_usleepFunction · 0.85
notify_oneMethod · 0.80
gettimeofday_usFunction · 0.70

Tested by

no test coverage detected