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

@@ -5685,8 +5685,7 @@ ParseFileError parse_packages(Parser *p, String init_filename) {
}
}
thread_pool_start(&parser_thread_pool);
thread_pool_wait_to_process(&parser_thread_pool);
thread_pool_wait(&parser_thread_pool);
for (ParseFileError err = ParseFile_None; mpmc_dequeue(&p->file_error_queue, &err); /**/) {
if (err != ParseFile_None) {