diff options
| author | gingerBill <bill@gingerbill.org> | 2023-01-03 14:45:09 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-01-03 14:45:09 +0000 |
| commit | 0fb3032b731b640a2d0d1d62b9f8dd548e224b0e (patch) | |
| tree | 178b8cc6c72684d7f0b0041af2b5616804b31638 /src/main.cpp | |
| parent | 69934c3b0b1b8ad0a499574c39c1ab177a1fe30a (diff) | |
General improves to `alloc_ast_node` and other unnecessary checks
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 7ac78241e..c07d2c400 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,11 +13,11 @@ #endif #include "exact_value.cpp" #include "build_settings.cpp" - gb_global ThreadPool global_thread_pool; gb_internal void init_global_thread_pool(void) { isize thread_count = gb_max(build_context.thread_count, 1); - thread_pool_init(&global_thread_pool, permanent_allocator(), thread_count, "ThreadPoolWorker"); + isize worker_count = thread_count-1; + thread_pool_init(&global_thread_pool, permanent_allocator(), worker_count, "ThreadPoolWorker"); } gb_internal bool thread_pool_add_task(WorkerTaskProc *proc, void *data) { return thread_pool_add_task(&global_thread_pool, proc, data); |