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

Method waitFor

src/jrd/ThreadCollect.h:159–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157#endif
158
159 void waitFor(AllThreads& thr)
160 {
161 Firebird::MutexLockGuard g(threadsMutex, FB_FUNCTION);
162 while (!thr.empty())
163 {
164 Thrd t = std::move(thr.back());
165 thr.pop_back();
166 {
167 Firebird::MutexUnlockGuard u(threadsMutex, FB_FUNCTION);
168 t.thread.waitForCompletion();
169 fb_assert(t.ending);
170 }
171 }
172 }
173
174 AllThreads threads;
175 Firebird::Mutex threadsMutex;

Callers

nothing calls this directly

Calls 5

pop_backMethod · 0.80
moveFunction · 0.50
emptyMethod · 0.45
backMethod · 0.45
waitForCompletionMethod · 0.45

Tested by

no test coverage detected