put thread into completion wait queue when it finished running
| 60 | |
| 61 | // put thread into completion wait queue when it finished running |
| 62 | void ending(Thread&& thd) |
| 63 | { |
| 64 | Firebird::MutexLockGuard g(threadsMutex, FB_FUNCTION); |
| 65 | |
| 66 | const Thread::Mark mark(thd); |
| 67 | |
| 68 | for (auto& n : threads) |
| 69 | { |
| 70 | if (mark == n.thread) |
| 71 | { |
| 72 | n.ending = true; |
| 73 | return; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | threads.push_back(Thrd(std::move(thd), true)); |
| 78 | } |
| 79 | |
| 80 | void ending(Thread::Mark& m) |
| 81 | { |
no test coverage detected