aboutsummaryrefslogtreecommitdiff
path: root/src/thread_pool.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-12-20 14:07:14 +0000
committergingerBill <bill@gingerbill.org>2022-12-20 14:07:14 +0000
commita0e3a99dd165858136dd0d60759b08b22f81cfa2 (patch)
tree682d479409462005453ddd7376986b5f0a21dff7 /src/thread_pool.cpp
parent0edda2bea769303166eaab2965f6cfb8b2bd807c (diff)
Remove need for `semaphore` in `Thread`
Diffstat (limited to 'src/thread_pool.cpp')
-rw-r--r--src/thread_pool.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/thread_pool.cpp b/src/thread_pool.cpp
index eca4d37ab..ba150bb6f 100644
--- a/src/thread_pool.cpp
+++ b/src/thread_pool.cpp
@@ -45,12 +45,7 @@ gb_internal void thread_pool_init(ThreadPool *pool, gbAllocator const &a, isize
slice_init(&pool->threads, a, thread_count);
for_array(i, pool->threads) {
Thread *t = &pool->threads[i];
- thread_init(t);
- }
-
- for_array(i, pool->threads) {
- Thread *t = &pool->threads[i];
- thread_start(t, thread_pool_thread_proc, pool);
+ thread_init_and_start(t, thread_pool_thread_proc, pool);
}
}