Rewrite thread_pool.cpp

This commit is contained in:
nakst
2021-08-22 21:13:41 +01:00
parent 2e921c88fb
commit 1f25f60a68
3 changed files with 73 additions and 142 deletions

View File

@@ -1693,8 +1693,7 @@ void lb_generate_code(lbGenerator *gen) {
thread_pool_add_task(&lb_thread_pool, lb_llvm_emit_worker_proc, wd);
}
thread_pool_start(&lb_thread_pool);
thread_pool_wait_to_process(&lb_thread_pool);
thread_pool_wait(&lb_thread_pool);
} else {
for_array(j, gen->modules.entries) {
lbModule *m = gen->modules.entries[j].value;