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

Function TRA_shutdown_sweep

src/jrd/tra.cpp:2793–2814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2791
2792
2793void TRA_shutdown_sweep()
2794{
2795/**************************************
2796 *
2797 * T R A _ s h u t d o w n _ s w e e p
2798 *
2799 **************************************
2800 *
2801 * Functional description
2802 * Wait for sweep threads exit.
2803 *
2804 **************************************/
2805 MutexLockGuard g(swThrMutex, FB_FUNCTION);
2806 if (sweepDown)
2807 return;
2808 sweepDown = true;
2809
2810 auto& swThr(sweepThreads());
2811 for (unsigned n = 0; n < swThr.getCount(); ++n)
2812 swThr[n]->waitForCompletion();
2813 swThr.clear();
2814}
2815
2816
2817static void start_sweeper(thread_db* tdbb)

Callers 1

shutdown_threadFunction · 0.85

Calls 3

getCountMethod · 0.45
waitForCompletionMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected