Remove unneeded mutex

This commit is contained in:
gingerBill
2023-01-02 16:56:05 +00:00
parent fa562ec5d6
commit c293f5b7eb
6 changed files with 41 additions and 42 deletions
+1 -2
View File
@@ -17,8 +17,7 @@
gb_global ThreadPool global_thread_pool;
gb_internal void init_global_thread_pool(void) {
isize thread_count = gb_max(build_context.thread_count, 1);
isize worker_count = thread_count-1; // NOTE(bill): The main thread will also be used for work
thread_pool_init(&global_thread_pool, permanent_allocator(), worker_count, "ThreadPoolWorker");
thread_pool_init(&global_thread_pool, permanent_allocator(), thread_count, "ThreadPoolWorker");
}
gb_internal bool thread_pool_add_task(WorkerTaskProc *proc, void *data) {
return thread_pool_add_task(&global_thread_pool, proc, data);