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

Method Dispose

Source/Engine/Threading/JobSystem.cpp:128–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128void JobSystemService::Dispose()
129{
130 Platform::AtomicStore(&ExitFlag, 1);
131 JobsSignal.NotifyAll();
132 Platform::Sleep(1);
133
134 for (int32 i = 0; i < ThreadsCount; i++)
135 {
136 if (Threads[i])
137 {
138 Threads[i]->Kill(true);
139 Delete(Threads[i]);
140 Threads[i] = nullptr;
141 }
142 }
143
144 Memory::DestructItems(JobContexts, (int32)JobContextsSize);
145 Platform::Free(JobContexts);
146 JobContexts = nullptr;
147}
148
149int32 JobSystemThread::Run()
150{

Callers

nothing calls this directly

Calls 4

DeleteFunction · 0.85
KillMethod · 0.80
AtomicStoreFunction · 0.50
FreeFunction · 0.50

Tested by

no test coverage detected