diff options
| author | gingerBill <bill@gingerbill.org> | 2020-06-29 15:58:24 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-06-29 15:58:24 +0100 |
| commit | 86448ee044aa29ed4a7b5ab3365fb40ce9147422 (patch) | |
| tree | 3942deedcb1e5da44cbd3f704fcb7432b25103e1 /core/thread/thread_pool.odin | |
| parent | 56a52a1d06346edaee316e6d53c4cbd6a07e1056 (diff) | |
Add `raw_data` to replace cases in which `&x[0]` was used
Diffstat (limited to 'core/thread/thread_pool.odin')
| -rw-r--r-- | core/thread/thread_pool.odin | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/thread/thread_pool.odin b/core/thread/thread_pool.odin index 8b6b15ece..64cd8ea38 100644 --- a/core/thread/thread_pool.odin +++ b/core/thread/thread_pool.odin @@ -116,9 +116,8 @@ pool_try_and_pop_task :: proc(pool: ^Pool) -> (task: Task, got_task: bool = fals if sync.mutex_try_lock(&pool.mutex) { if len(pool.tasks) != 0 { intrinsics.atomic_add(&pool.processing_task_count, 1); - task = pool.tasks[0]; + task = pop_front(&pool.tasks); got_task = true; - ordered_remove(&pool.tasks, 0); } sync.mutex_unlock(&pool.mutex); } |