MCPcopy Create free account
hub / github.com/bazz1tv/snestracker / DestroyThreadPool

Function DestroyThreadPool

pc/ext/unrar/threadmisc.cpp:80–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78
79
80void DestroyThreadPool(ThreadPool *Pool)
81{
82 CriticalSectionStart(&PoolCreateSync.CritSection);
83
84 if (Pool!=NULL && Pool==GlobalPool && GlobalPoolUseCount > 0 && --GlobalPoolUseCount == 0)
85 delete GlobalPool;
86#ifdef RARDLL
87 // To correctly work in multithreaded environment UnRAR.dll creates
88 // new pools if global pool is already in use. We delete such pools here.
89 if (Pool!=NULL && Pool!=GlobalPool)
90 delete Pool;
91#endif
92
93 CriticalSectionEnd(&PoolCreateSync.CritSection);
94}
95
96
97static THREAD_HANDLE ThreadCreate(NATIVE_THREAD_PTR Proc,void *Data)

Callers 4

~RecVolumes5Method · 0.85
~RecVolumes3Method · 0.85
~DataHashMethod · 0.85
~UnpackMethod · 0.85

Calls 2

CriticalSectionStartFunction · 0.85
CriticalSectionEndFunction · 0.85

Tested by

no test coverage detected