diff options
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index cd023998c..939872c0c 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -4177,6 +4177,10 @@ void check_with_workers(Checker *c, ThreadProc *proc, isize total_count) { semaphore_wait(&c->info.collect_semaphore); for (isize i = 0; i < worker_count; i++) { + thread_join(threads+i); + } + + for (isize i = 0; i < worker_count; i++) { thread_destroy(threads+i); } } @@ -4812,6 +4816,10 @@ void check_procedure_bodies(Checker *c) { semaphore_wait(&c->procs_to_check_semaphore); for (isize i = 0; i < worker_count; i++) { + thread_join(threads+i); + } + + for (isize i = 0; i < worker_count; i++) { thread_destroy(threads+i); } |