From a0e3a99dd165858136dd0d60759b08b22f81cfa2 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 20 Dec 2022 14:07:14 +0000 Subject: Remove need for `semaphore` in `Thread` --- src/thread_pool.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/thread_pool.cpp') 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); } } -- cgit v1.2.3