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

Function FreeJob

engine/dlib/src/dlib/jobsystem.cpp:202–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200// }
201
202static void FreeJob(JobThreadContext* ctx, HJob hjob)
203{
204 uint32_t generation = ToGeneration(hjob);
205 uint32_t index = ToIndex(hjob);
206
207 JobItem& item = ctx->m_Items.Get(index);
208 assert(item.m_Generation == generation);
209
210 RemoveChildFromParent(ctx, hjob);
211
212 item.m_Generation = INVALID_INDEX;
213 item.m_Status = JOBSYSTEM_STATUS_FREE;
214 item.m_CancelRequested = 0;
215
216 ctx->m_Items.Free(index, false);
217}
218
219JobSystemResult JobSystemSetParent(HJobContext context, HJob hchild, HJob hparent)
220{

Callers 1

ProcessFinishedJobsFunction · 0.85

Calls 6

ToGenerationFunction · 0.85
ToIndexFunction · 0.85
RemoveChildFromParentFunction · 0.85
assertFunction · 0.50
GetMethod · 0.45
FreeMethod · 0.45

Tested by

no test coverage detected