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

Method RunAll

Source/Engine/Threading/MainThreadTask.cpp:14–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14void MainThreadTask::RunAll(float dt)
15{
16 PROFILE_CPU();
17 Locker.Lock();
18 for (int32 i = Waiting.Count() - 1; i >= 0; i--)
19 {
20 auto task = Waiting[i];
21 task->InitialDelay -= dt;
22 if (task->InitialDelay < ZeroTolerance)
23 {
24 Waiting.RemoveAt(i);
25 Queue.Add(task);
26 }
27 }
28 for (int32 i = 0; i < Queue.Count(); i++)
29 {
30 Queue[i]->Execute();
31 }
32 Queue.Clear();
33 Locker.Unlock();
34}
35
36String MainThreadTask::ToString() const
37{

Callers

nothing calls this directly

Calls 7

LockMethod · 0.80
UnlockMethod · 0.80
CountMethod · 0.45
RemoveAtMethod · 0.45
AddMethod · 0.45
ExecuteMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected