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

Method wait

extern/boost/boost/thread/barrier.hpp:218–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216 }
217
218 bool wait()
219 {
220 boost::unique_lock < boost::mutex > lock(m_mutex);
221 unsigned int gen = m_generation;
222
223 if (--m_count == 0)
224 {
225 m_generation++;
226 m_count = static_cast<unsigned int>(fct_());
227 BOOST_ASSERT(m_count != 0);
228 lock.unlock();
229 m_cond.notify_all();
230 return true;
231 }
232
233 while (gen == m_generation)
234 m_cond.wait(lock);
235 return false;
236 }
237
238 void count_down_and_wait()
239 {

Callers

nothing calls this directly

Calls 2

unlockMethod · 0.45
notify_allMethod · 0.45

Tested by

no test coverage detected