| 83 | } |
| 84 | |
| 85 | void StaticThreadPool::reloadConfiguration(size_t max_threads, size_t max_free_threads, size_t queue_size) |
| 86 | { |
| 87 | if (!instance) |
| 88 | throw Exception(ErrorCodes::LOGICAL_ERROR, "The {} is not initialized", name); |
| 89 | |
| 90 | std::lock_guard lock(mutex); |
| 91 | |
| 92 | instance->setMaxThreads(turbo_mode_enabled > 0 ? max_threads_turbo : max_threads); |
| 93 | instance->setMaxFreeThreads(max_free_threads); |
| 94 | instance->setQueueSize(queue_size); |
| 95 | } |
| 96 | |
| 97 | |
| 98 | ThreadPool & StaticThreadPool::get() |
no test coverage detected