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

Function init_routine

test/bthread_once_unittest.cpp:33–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31butil::atomic<int> g_bthread_once_count(0);
32
33void init_routine() {
34 bthread_usleep(2000 * 1000);
35 g_bthread_once_count.fetch_add(1, butil::memory_order_relaxed);
36}
37
38void bthread_once_task() {
39 bthread_once(&g_bthread_once_control, init_routine);

Callers 1

bthread_once_implFunction · 0.85

Calls 2

bthread_usleepFunction · 0.85
fetch_addMethod · 0.80

Tested by

no test coverage detected