| 384 | return; |
| 385 | } |
| 386 | void Module::DestroyAllTasks() { |
| 387 | for (auto task : tasks_) { |
| 388 | auto c = task->GetTC(); |
| 389 | |
| 390 | int wid = c->WorkerId(); |
| 391 | if (wid >= 0) { |
| 392 | bess::Scheduler *s = workers[wid]->scheduler(); |
| 393 | s->wakeup_queue().Remove(c); |
| 394 | } |
| 395 | |
| 396 | CHECK(detach_tc(c)); |
| 397 | delete c; |
| 398 | } |
| 399 | tasks_.clear(); |
| 400 | } |
| 401 | |
| 402 | void Module::DeregisterAllAttributes() { |
| 403 | for (const auto &it : attrs_) { |