MCPcopy Create free account
hub / github.com/apache/impala / Init

Method Init

be/src/kudu/util/threadpool.cc:396–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396Status ThreadPool::Init() {
397 if (!pool_status_.IsUninitialized()) {
398 return Status::NotSupported("The thread pool is already initialized");
399 }
400 pool_status_ = Status::OK();
401 num_threads_pending_start_ = min_threads_;
402 for (int i = 0; i < min_threads_; i++) {
403 Status status = CreateThread();
404 if (!status.ok()) {
405 Shutdown();
406 return status;
407 }
408 }
409 if (enable_scheduler_) {
410 scheduler_ = new SchedulerThread(name_, schedule_period_ms_);
411 RETURN_NOT_OK(scheduler_->Start());
412 }
413 return Status::OK();
414}
415
416void ThreadPool::Shutdown() {
417 {

Callers 1

BuildMethod · 0.45

Calls 4

NotSupportedFunction · 0.85
OKFunction · 0.85
okMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected