MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / run

Method run

modules/core/task/src/task2.cpp:308–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306 }
307
308 void run()
309 {
310 if (!isMainThread)
311 {
312 //initial with wait to avoid spinning
313 work.wait([this]() {
314 return work.num > 0 || shutdown;
315 });
316 }
317 while(!shutdown || work.num > 0)
318 {
319 waitForWork();
320 runUntilIdle();
321 }
322 }
323
324 void enqueue(Task&& task, bool pinned)
325 {

Callers 1

startMethod · 0.45

Calls 1

waitMethod · 0.45

Tested by

no test coverage detected