Compilation: actually do codegen on non-initial updates

This commit is contained in:
mlugg authored and Jacob Young committed 2024-08-17 18:50:10 -04:00
1 parent 1ccbc6ca20
commit 978fe68a65
1 file changed
+4 -1
+4 -1
View File
@@ -3685,7 +3685,10 @@ fn performAllTheWorkInner(
zcu.codegen_prog_node = main_progress_node.start("Code Generation", 0);
}
if (!InternPool.single_threaded) comp.thread_pool.spawnWgId(&work_queue_wait_group, codegenThread, .{comp});
if (!InternPool.single_threaded) {
comp.codegen_work.done = false; // may be `true` from a prior update
comp.thread_pool.spawnWgId(&work_queue_wait_group, codegenThread, .{comp});
}
defer if (!InternPool.single_threaded) {
{
comp.codegen_work.mutex.lock();