| 116 | }; |
| 117 | template<typename func> |
| 118 | void exec_events(func &&f) { |
| 119 | std::vector<C_dispatch<func>*> dis; |
| 120 | for (unsigned i = 0; i < stack->get_num_worker(); ++i) { |
| 121 | Worker *w = stack->get_worker(i); |
| 122 | C_dispatch<func> *e = new C_dispatch<func>(w, std::move(f)); |
| 123 | stack->get_worker(i)->center.dispatch_event_external(e); |
| 124 | dis.push_back(e); |
| 125 | } |
| 126 | |
| 127 | for (auto &&e : dis) { |
| 128 | e->wait(); |
| 129 | delete e; |
| 130 | } |
| 131 | } |
| 132 | }; |
| 133 | |
| 134 | class C_poll : public EventCallback { |
nothing calls this directly
no test coverage detected