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

Method ReleaseToken

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

Source from the content-addressed store, hash-verified

514}
515
516void ThreadPool::ReleaseToken(ThreadPoolToken* t) {
517 MutexLock guard(lock_);
518 CHECK(!t->IsActive()) << Substitute("Token with state $0 may not be released",
519 ThreadPoolToken::StateToString(t->state()));
520 CHECK_EQ(1, tokens_.erase(t));
521}
522
523Status ThreadPool::Submit(std::function<void()> f) {
524 return DoSubmit(std::move(f), tokenless_.get());

Callers 1

~ThreadPoolTokenMethod · 0.80

Calls 4

SubstituteFunction · 0.85
eraseMethod · 0.80
IsActiveMethod · 0.45
stateMethod · 0.45

Tested by

no test coverage detected