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

Method enqueueCore

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

Source from the content-addressed store, hash-verified

374}
375
376int JobQueue::enqueueCore(JobItem* jobItem, bool isEndJob) SKR_NOEXCEPT
377{
378 SKR_ASSERT(jobItem->status == kJobItemStatusNone);
379
380 if (skr_atomic32_load_acquire(&jobItem->status) != kJobItemStatusNone)
381 {
382 return ASYNC_RESULT_ERROR_INVALID_PARAM;
383 }
384
385 if (thread_list.size() == 0)
386 {
387 SKR_ASSERT(0);
388 return ASYNC_RESULT_ERROR_JOB_NOTHREAD;
389 }
390
391 return itemList->push(jobItem, isEndJob);
392}
393
394uint32_t JobQueue::items_count() const SKR_NOEXCEPT
395{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected