Print all living (started and not finished) bthreads
| 198 | |
| 199 | // Print all living (started and not finished) bthreads |
| 200 | void 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 | |
| 216 | static int add_workers_for_each_tag(int num) { |
| 217 | int added = 0; |
no test coverage detected