Update web_worker.zig

This commit is contained in:
Jarred Sumner
2025-09-26 22:53:24 -07:00
parent 6869f14cab
commit da1edb7e2b

View File

@@ -558,6 +558,11 @@ pub fn setRefInternal(this: *WebWorker, value: bool) void {
pub fn exit(this: *WebWorker) void {
this.exit_called = true;
this.notifyNeedTermination();
if (this.vm) |vm| {
if (!vm.isShuttingDown()) {
vm.jsc_vm.notifyNeedTermination();
}
}
}
/// Request a terminate from any thread.