MCPcopy Create free account
hub / github.com/apache/brpc / ~WorkQueue

Method ~WorkQueue

test/condition_variable_unittest.cc:478–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478WorkQueue::~WorkQueue() {
479 {
480 butil::AutoLock auto_lock(lock_);
481 SetShutdown();
482 }
483 work_is_available_.Broadcast(); // Tell them all to terminate.
484
485 for (int i = 0; i < thread_count_; ++i) {
486 PlatformThread::Join(thread_handles_[i]);
487 }
488 EXPECT_EQ(0, waiting_thread_count_);
489}
490
491int WorkQueue::GetThreadId() {
492 DFAKE_SCOPED_RECURSIVE_LOCK(locked_methods_);

Callers

nothing calls this directly

Calls 2

JoinFunction · 0.85
BroadcastMethod · 0.80

Tested by

no test coverage detected