aboutsummaryrefslogtreecommitdiff
path: root/src/thread_pool.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-08-26 16:10:32 +0100
committergingerBill <bill@gingerbill.org>2021-08-26 16:10:32 +0100
commite45aa68c14149cc4ebcc352e3fe4631c642f33f3 (patch)
tree2e6ced67e7e909b7ec6ddbdaf2c016c06f1e3276 /src/thread_pool.cpp
parent6dfab34aca9a645f6f8c1ddd220f663aa90de529 (diff)
Remove unneeded +1 for `outstanding_task_count`
Diffstat (limited to 'src/thread_pool.cpp')
-rw-r--r--src/thread_pool.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/thread_pool.cpp b/src/thread_pool.cpp
index e904a2e29..b29fcc5d9 100644
--- a/src/thread_pool.cpp
+++ b/src/thread_pool.cpp
@@ -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);
}