| 996 | } |
| 997 | |
| 998 | folly::IOThreadPoolExecutor* executor() { |
| 999 | static std::mutex mutex; |
| 1000 | std::lock_guard<std::mutex> l(mutex); |
| 1001 | if (executorPoolSize_ == 0) { |
| 1002 | return nullptr; |
| 1003 | } |
| 1004 | if (executor_ == nullptr) { |
| 1005 | executor_ = |
| 1006 | std::make_unique<folly::IOThreadPoolExecutor>(executorPoolSize_); |
| 1007 | } |
| 1008 | return executor_.get(); |
| 1009 | } |
| 1010 | |
| 1011 | void reset() { |
| 1012 | spiller_.reset(); |
no test coverage detected