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

Method Wait

Source/Engine/Threading/JobSystem.cpp:396–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396void JobSystem::Wait()
397{
398#if JOB_SYSTEM_ENABLED
399 PROFILE_CPU();
400 ZoneColor(TracyWaitZoneColor);
401
402 int64 numJobs = Platform::AtomicRead(&JobContextsCount);
403 while (numJobs > 0)
404 {
405 WaitMutex.Lock();
406 WaitSignal.Wait(WaitMutex, 1);
407 WaitMutex.Unlock();
408
409 numJobs = Platform::AtomicRead(&JobContextsCount);
410 }
411#endif
412}
413
414void JobSystem::Wait(int64 label)
415{

Callers 1

RunMethod · 0.45

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80
AtomicReadFunction · 0.50

Tested by

no test coverage detected