| 374 | } |
| 375 | |
| 376 | int 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 | |
| 394 | uint32_t JobQueue::items_count() const SKR_NOEXCEPT |
| 395 | { |
nothing calls this directly
no test coverage detected