MCPcopy Create free account
hub / github.com/defold/defold / UpdateUntilCallbackStarted

Function UpdateUntilCallbackStarted

engine/dlib/src/test/test_job_system.cpp:522–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520}
521
522static void UpdateUntilCallbackStarted(void* user_data)
523{
524 BlockingCallbackTrack* track = (BlockingCallbackTrack*)user_data;
525 while (!dmAtomicGet32(&track->m_CallbackStarted) && !dmAtomicGet32(&track->m_StopUpdateThread))
526 {
527 JobSystemUpdate(track->m_JobSystem, 0);
528 dmTime::Sleep(1000);
529 }
530}
531
532// A finished-but-not-yet-flushed job should be converted to a canceled callback
533// when cancellation happens before JobSystemUpdate() runs callbacks.

Callers

nothing calls this directly

Calls 3

dmAtomicGet32Function · 0.85
JobSystemUpdateFunction · 0.85
SleepFunction · 0.50

Tested by

no test coverage detected