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

Function bthread_once_task

test/bthread_once_unittest.cpp:38–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void bthread_once_task() {
39 bthread_once(&g_bthread_once_control, init_routine);
40 // `init_routine' only be called once.
41 ASSERT_EQ(1, g_bthread_once_count.load(butil::memory_order_relaxed));
42}
43
44void* first_bthread_once_task(void*) {
45 g_bthread_once_started = true;

Callers 3

first_bthread_once_taskFunction · 0.85
other_bthread_once_taskFunction · 0.85
TESTFunction · 0.85

Calls 2

bthread_onceFunction · 0.85
loadMethod · 0.45

Tested by

no test coverage detected