MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Dispose

Method Dispose

Source/Engine/Threading/ThreadPool.cpp:99–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void ThreadPoolService::Dispose()
100{
101 // Set exit flag and wake up threads
102 Platform::AtomicStore(&ThreadPoolImpl::ExitFlag, 1);
103 ThreadPoolImpl::JobsSignal.NotifyAll();
104
105 // Wait some time
106 Platform::Sleep(10);
107
108 // Delete threads
109 for (int32 i = 0; i < ThreadPoolImpl::Threads.Count(); i++)
110 {
111 ThreadPoolImpl::Threads[i]->Kill(true);
112 }
113 ThreadPoolImpl::Threads.ClearDelete();
114}
115
116int32 ThreadPool::ThreadProc()
117{

Callers

nothing calls this directly

Calls 4

KillMethod · 0.80
AtomicStoreFunction · 0.50
CountMethod · 0.45
ClearDeleteMethod · 0.45

Tested by

no test coverage detected