MCPcopy Create free account
hub / github.com/apache/thrift / start

Method start

lib/cpp/src/thrift/concurrency/ThreadManager.cpp:370–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370void ThreadManager::Impl::start() {
371 Guard g(mutex_);
372 if (state_ == ThreadManager::STOPPED) {
373 return;
374 }
375
376 if (state_ == ThreadManager::UNINITIALIZED) {
377 if (!threadFactory_) {
378 throw InvalidArgumentException();
379 }
380 state_ = ThreadManager::STARTED;
381 monitor_.notifyAll();
382 }
383
384 while (state_ == STARTING) {
385 monitor_.wait();
386 }
387}
388
389void ThreadManager::Impl::stop() {
390 Guard g(mutex_);

Callers 1

addWorkerMethod · 0.45

Calls 3

notifyAllMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected