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

Function print_living_tasks

src/bthread/bthread.cpp:200–214  ·  view source on GitHub ↗

Print all living (started and not finished) bthreads

Source from the content-addressed store, hash-verified

198
199// Print all living (started and not finished) bthreads
200void print_living_tasks(std::ostream& os, bool enable_trace) {
201 TaskControl* c = get_task_control();
202 if (NULL == c) {
203 os << "TaskControl has not been created";
204 return;
205 }
206 auto tids = c->get_living_bthreads();
207 if (tids.empty()) {
208 os << "No living bthreads\n";
209 return;
210 }
211 for (auto tid : tids) {
212 print_task(os, tid, enable_trace, true);
213 }
214}
215
216static int add_workers_for_each_tag(int num) {
217 int added = 0;

Callers 1

default_methodMethod · 0.85

Calls 3

print_taskFunction · 0.85
get_task_controlFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected