| 53 | } |
| 54 | |
| 55 | void ThreadPoolCallbackRunnerFast::startMoreThreadsIfNeeded(size_t active_tasks_, std::unique_lock<std::mutex> &) |
| 56 | { |
| 57 | while (threads < max_threads && threads < active_tasks_ && !shutdown_requested) |
| 58 | { |
| 59 | pool->scheduleOrThrow([this] { threadFunction(); }); |
| 60 | ++threads; // only if scheduleOrThrow didn't throw |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | void ThreadPoolCallbackRunnerFast::operator()(std::function<void()> f) |
| 65 | { |
nothing calls this directly
no test coverage detected