mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
movie
This commit is contained in:
@@ -464,12 +464,6 @@ fn unhandledError(this: *WebWorker, _: anyerror) void {
|
||||
this.flushLogs();
|
||||
}
|
||||
|
||||
pub export fn WebWorkerLifecycleHandle__requestTermination(handle: ?*WebWorkerLifecycleHandle) void {
|
||||
if (handle) |h| {
|
||||
h.requestTermination();
|
||||
}
|
||||
}
|
||||
|
||||
fn spin(this: *WebWorker) void {
|
||||
log("[{d}] spin start", .{this.execution_context_id});
|
||||
|
||||
@@ -662,6 +656,12 @@ pub fn exitAndDeinit(this: *WebWorker) noreturn {
|
||||
bun.exitThread();
|
||||
}
|
||||
|
||||
pub export fn WebWorkerLifecycleHandle__requestTermination(handle: ?*WebWorkerLifecycleHandle) void {
|
||||
if (handle) |h| {
|
||||
h.requestTermination();
|
||||
}
|
||||
}
|
||||
|
||||
/// Manages the complex timing surrounding web worker creation and destruction
|
||||
const WebWorkerLifecycleHandle = struct {
|
||||
const RefCount = bun.ptr.ThreadSafeRefCount(@This(), "ref_count", WebWorkerLifecycleHandle.deinit, .{});
|
||||
|
||||
Reference in New Issue
Block a user