MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / wait

Method wait

extern/libcds/test/include/cds_test/thread.h:80–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80 bool wait()
81 {
82 std::unique_lock< std::mutex > lock( m_mtx );
83 if ( --m_count == 0 ) {
84 m_cv.notify_all();
85 return true;
86 }
87
88 while ( m_count != 0 )
89 m_cv.wait( lock );
90
91 return false;
92 }
93
94 private:
95 size_t m_count;

Callers 4

waitMethod · 0.45
runMethod · 0.45
ready_to_startMethod · 0.45
thread_doneMethod · 0.45

Calls 1

notify_allMethod · 0.45

Tested by

no test coverage detected