| 514 | } |
| 515 | |
| 516 | void 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 | |
| 523 | Status ThreadPool::Submit(std::function<void()> f) { |
| 524 | return DoSubmit(std::move(f), tokenless_.get()); |
no test coverage detected