diff options
| author | gingerBill <bill@gingerbill.org> | 2022-12-20 14:07:14 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-12-20 14:07:14 +0000 |
| commit | a0e3a99dd165858136dd0d60759b08b22f81cfa2 (patch) | |
| tree | 682d479409462005453ddd7376986b5f0a21dff7 /src/thread_pool.cpp | |
| parent | 0edda2bea769303166eaab2965f6cfb8b2bd807c (diff) | |
Remove need for `semaphore` in `Thread`
Diffstat (limited to 'src/thread_pool.cpp')
| -rw-r--r-- | src/thread_pool.cpp | 7 |
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); } } |