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

Method Execute

Source/Engine/Threading/Task.cpp:149–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void Task::Execute()
150{
151 if (!IsQueued())
152 return;
153 SetState(TaskState::Running);
154
155 // Perform an operation
156 bool failed = Run();
157
158 // Process result
159 if (IsCancelRequested())
160 {
161 SetState(TaskState::Canceled);
162 }
163 else if (failed)
164 {
165 OnFail();
166 }
167 else
168 {
169 OnFinish();
170 }
171}
172
173void Task::OnStart()
174{

Callers 2

RunAllMethod · 0.45
ThreadProcMethod · 0.45

Calls 4

IsQueuedFunction · 0.85
SetStateFunction · 0.85
IsCancelRequestedFunction · 0.85
RunFunction · 0.50

Tested by

no test coverage detected