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

Method houseKeeping

src/jrd/ThreadCollect.h:104–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102 }
103
104 void houseKeeping()
105 {
106 if (threads.empty())
107 return;
108
109 // join finished threads
110 AllThreads finished(threads.get_allocator());
111 { // mutex scope
112 Firebird::MutexLockGuard g(threadsMutex, FB_FUNCTION);
113
114 for (auto n = threads.begin(); n != threads.end(); )
115 {
116 if (n->ending)
117 {
118 finished.push_back(std::move(*n));
119 n = threads.erase(n);
120 }
121 else
122 ++n;
123 }
124 }
125
126 waitFor(finished);
127 }
128
129 private:
130 struct Thrd

Callers 3

JRD_shutdown_attachmentFunction · 0.80
JRD_shutdown_attachmentsFunction · 0.80
startMethod · 0.80

Calls 6

moveFunction · 0.50
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected