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

Method Schedule

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

Submit a task, running after delay_ms delay some time

Source from the content-addressed store, hash-verified

259
260// Submit a task, running after delay_ms delay some time
261Status ThreadPoolToken::Schedule(std::function<void()> f, int64_t delay_ms) {
262 CHECK(mode() == ThreadPool::ExecutionMode::SERIAL);
263 MonoTime execute_time = MonoTime::Now();
264 execute_time.AddDelta(MonoDelta::FromMilliseconds(delay_ms));
265 return pool_->Schedule(this, std::move(f), execute_time);
266}
267
268void ThreadPoolToken::Wait() {
269 MutexLock unique_lock(pool_->lock_);

Callers 2

TEST_FFunction · 0.45

Calls 4

moveFunction · 0.85
IllegalStateFunction · 0.85
OKFunction · 0.85
AddDeltaMethod · 0.80

Tested by 2

TEST_FFunction · 0.36