| 104 | } |
| 105 | |
| 106 | void StaticThreadPool::enableTurboMode() |
| 107 | { |
| 108 | if (!instance) |
| 109 | throw Exception(ErrorCodes::LOGICAL_ERROR, "The {} is not initialized", name); |
| 110 | |
| 111 | std::lock_guard lock(mutex); |
| 112 | |
| 113 | ++turbo_mode_enabled; |
| 114 | if (turbo_mode_enabled == 1) |
| 115 | instance->setMaxThreads(max_threads_turbo); |
| 116 | } |
| 117 | |
| 118 | void StaticThreadPool::disableTurboMode() |
| 119 | { |
no test coverage detected