diff --git a/main.c b/main.c index da83640..35cee0b 100644 --- a/main.c +++ b/main.c @@ -71,8 +71,10 @@ static size_t threads_parallel(LVM *lvm, void *ud, size_t argn, set_LValueU *hea lvm_reset_regs(&set); lvm_call(lvm, func, 0, heap, &set); + // This thread must still respond to the GC while(atomic_load(&ctx.finished) != no - 1) { lvm->safepoint_func(lvm, heap, regset); + thrd_yield(); } return 0;