mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 17:34:34 +00:00
Remove unneeded +1 for outstanding_task_count
This commit is contained in:
@@ -62,7 +62,6 @@ void thread_pool_thread_entry(ThreadPool *pool) {
|
||||
void thread_pool_init(ThreadPool *pool, gbAllocator const &a, isize thread_count, char const *worker_prefix) {
|
||||
memset(pool, 0, sizeof(ThreadPool));
|
||||
mutex_init(&pool->task_list_mutex);
|
||||
pool->outstanding_task_count.store(1);
|
||||
pool->thread_count = thread_count;
|
||||
}
|
||||
|
||||
@@ -74,8 +73,6 @@ void thread_pool_wait(ThreadPool *pool) {
|
||||
for (int i = 0; i < pool->thread_count; i++) {
|
||||
thread_pool_start_thread(pool);
|
||||
}
|
||||
|
||||
pool->outstanding_task_count.fetch_sub(1);
|
||||
thread_pool_thread_entry(pool);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user