Minor style change

This commit is contained in:
gingerBill
2023-01-02 00:35:12 +00:00
parent 3c90a05957
commit da479c7628
2 changed files with 2 additions and 8 deletions

View File

@@ -61,9 +61,7 @@ void thread_pool_queue_push(Thread *thread, WorkerTask task) {
u64 tail = ((u32)capture) & mask;
u64 new_head = (head + 1) & mask;
if (new_head == tail) {
GB_PANIC("Thread Queue Full!\n");
}
GB_ASSERT_MSG(new_head != tail, "Thread Queue Full!");
// This *must* be done in here, to avoid a potential race condition where we no longer own the slot by the time we're assigning
thread->queue[head] = task;
@@ -139,7 +137,7 @@ gb_internal THREAD_PROC(thread_pool_thread_proc) {
for (;;) {
work_start:
if (!pool->running) {
if (!pool->running.load()) {
break;
}