| 36 | } |
| 37 | |
| 38 | void 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 | |
| 44 | void* first_bthread_once_task(void*) { |
| 45 | g_bthread_once_started = true; |
no test coverage detected