MCPcopy Create free account
hub / github.com/apache/brpc / SpinUntilAllThreadsAreWaiting

Method SpinUntilAllThreadsAreWaiting

test/condition_variable_unittest.cc:630–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628}
629
630void WorkQueue::SpinUntilAllThreadsAreWaiting() {
631 while (true) {
632 {
633 butil::AutoLock auto_lock(lock_);
634 if (waiting_thread_count_ == thread_count_)
635 break;
636 }
637 PlatformThread::Sleep(TimeDelta::FromMilliseconds(30));
638 }
639}
640
641void WorkQueue::SpinUntilTaskCountLessThan(int task_count) {
642 while (true) {

Callers 1

TEST_FFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected