mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-07 13:33:13 +00:00
Remove the synchronization primitive init/destroy calls
This commit is contained in:
@@ -23,9 +23,6 @@ struct ThreadPool {
|
||||
};
|
||||
|
||||
gb_internal void thread_pool_init(ThreadPool *pool, gbAllocator const &a, isize thread_count, char const *worker_name) {
|
||||
mutex_init(&pool->task_lock);
|
||||
condition_init(&pool->tasks_available);
|
||||
|
||||
pool->allocator = a;
|
||||
slice_init(&pool->threads, a, thread_count + 1);
|
||||
|
||||
@@ -54,8 +51,6 @@ gb_internal void thread_pool_destroy(ThreadPool *pool) {
|
||||
}
|
||||
|
||||
gb_free(pool->allocator, pool->threads.data);
|
||||
mutex_destroy(&pool->task_lock);
|
||||
condition_destroy(&pool->tasks_available);
|
||||
}
|
||||
|
||||
void thread_pool_queue_push(Thread *thread, WorkerTask task) {
|
||||
|
||||
Reference in New Issue
Block a user