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

Method is_current_main_task

src/bthread/task_group.h:175–175  ·  view source on GitHub ↗

True iff current task is the one running run_main_task()

Source from the content-addressed store, hash-verified

173
174 // True iff current task is the one running run_main_task()
175 bool is_current_main_task() const { return current_tid() == _main_tid; }
176 // True iff current task is in pthread-mode.
177 bool is_current_pthread_task() const
178 { return _cur_meta->stack == _main_stack; }

Callers 3

bthread_selfFunction · 0.80
bthread_exitFunction · 0.80
bthread_cpu_clock_nsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected