| 30 | |
| 31 | template <typename F> |
| 32 | void CreateThreads(size_t count, F functor) { |
| 33 | _threads.reserve(_threads.size() + count); |
| 34 | for (size_t i = 0u; i < count; ++i) { |
| 35 | CreateThread(functor); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | void JoinAll() { |
| 40 | for (auto &thread : _threads) { |