| 116 | } |
| 117 | |
| 118 | void StaticThreadPool::disableTurboMode() |
| 119 | { |
| 120 | if (!instance) |
| 121 | throw Exception(ErrorCodes::LOGICAL_ERROR, "The {} is not initialized", name); |
| 122 | |
| 123 | std::lock_guard lock(mutex); |
| 124 | |
| 125 | --turbo_mode_enabled; |
| 126 | if (turbo_mode_enabled == 0) |
| 127 | instance->setMaxThreads(max_threads_normal); |
| 128 | } |
| 129 | |
| 130 | void StaticThreadPool::setMaxTurboThreads(size_t max_threads_turbo_) |
| 131 | { |
no test coverage detected