MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / deRegisterThreadAndFinalizeTask

Method deRegisterThreadAndFinalizeTask

src/common/task_system/task.cpp:15–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15void Task::deRegisterThreadAndFinalizeTask() {
16 lock_t lck{taskMtx};
17 ++numThreadsFinished;
18 if (!hasExceptionNoLock() && isCompletedNoLock()) {
19 try {
20 finalize();
21 } catch (std::exception& e) {
22 setExceptionNoLock(std::current_exception());
23 }
24 }
25 if (isCompletedNoLock()) {
26 lck.unlock();
27 cv.notify_all();
28 }
29}
30
31} // namespace common
32} // namespace lbug

Callers 2

runWorkerThreadMethod · 0.80
runTaskMethod · 0.80

Calls 5

hasExceptionNoLockFunction · 0.85
isCompletedNoLockFunction · 0.85
setExceptionNoLockFunction · 0.85
unlockMethod · 0.80
finalizeFunction · 0.50

Tested by

no test coverage detected