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

Function EnsureInited

Source/Engine/Debug/DebugCommands.cpp:340–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338 }
339
340 void EnsureInited()
341 {
342 // Check current state
343 Locker.Lock();
344 bool inited = Inited;
345 Locker.Unlock();
346 if (inited)
347 return;
348
349 // Wait for any async task
350 if (AsyncTask)
351 AsyncTask->Wait();
352
353 // Do sync init if still not inited
354 Locker.Lock();
355 if (!Inited)
356 InitCommands();
357 Locker.Unlock();
358 }
359}
360
361class DebugCommandsService : public EngineService

Callers 5

ExecuteMethod · 0.85
SearchMethod · 0.85
GetAllCommandsMethod · 0.85
GetCommandFlagsMethod · 0.85
IterateMethod · 0.85

Calls 4

InitCommandsFunction · 0.85
LockMethod · 0.80
UnlockMethod · 0.80
WaitMethod · 0.45

Tested by

no test coverage detected