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

Method erase

modules/core/core/src/async/job.cpp:75–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 }
74
75 void erase(JobItem* jobItem)
76 {
77 cond->lock();
78 SKR_ASSERT(jobItem);
79 SKR_ASSERT(jobItem->status != kJobItemStatusNone);
80
81 bool isFound = false;
82 for (auto i = list_consumed.begin(); i != list_consumed.end(); ++i)
83 {
84 if ((*i) == jobItem)
85 {
86 // update the status of JobItem together with the state of the queue
87 list_consumed.erase(i);
88 skr_atomic32_store_release(&jobItem->status, kJobItemStatusNone);
89 isFound = true;
90 break;
91 }
92 }
93 SKR_ASSERT(isFound);
94
95 cond->unlock();
96 }
97
98 JobItem* getRunnableJobItem()
99 {

Callers 8

UnregisterCookerMethod · 0.45
SampleChannelFunction · 0.45
ImportMethod · 0.45
GetSkinsForSceneMethod · 0.45
getRunnableJobItemMethod · 0.45
runMethod · 0.45
checkMethod · 0.45
DependencyGraphImplClass · 0.45

Calls 5

lockMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected