| 25 | } |
| 26 | |
| 27 | virtual bool CheckForCompletion() const override { |
| 28 | for (const auto& as : group) { |
| 29 | if (!as.Completed()) { |
| 30 | return false; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | std::function<void(const std::vector<Async<E>>&)> c = callback; |
| 35 | std::vector<Async<E>> g = group; |
| 36 | thread->Queue([c, g]() { |
| 37 | c(g); |
| 38 | }); |
| 39 | return true; |
| 40 | } |
| 41 | |
| 42 | Thread* thread; |
| 43 | std::function<void(const std::vector<Async<E>>&)> callback; |