From 0fd8f549e2194223eca2d4b17f4e96cd5a0f5fd5 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Wed, 13 Mar 2024 22:52:25 +0530 Subject: fix(ext/node): allow automatic worker_thread termination (#22647) Co-authored-by: Matt Mastracci --- runtime/ops/worker_host.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/ops') diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs index 1d056d459..3cfad5abb 100644 --- a/runtime/ops/worker_host.rs +++ b/runtime/ops/worker_host.rs @@ -35,6 +35,7 @@ pub struct CreateWebWorkerArgs { pub permissions: PermissionsContainer, pub main_module: ModuleSpecifier, pub worker_type: WebWorkerType, + pub close_on_idle: bool, pub maybe_worker_metadata: Option, } @@ -114,6 +115,7 @@ pub struct CreateWorkerArgs { source_code: String, specifier: String, worker_type: WebWorkerType, + close_on_idle: bool, } /// Create worker as the host @@ -191,6 +193,7 @@ fn op_create_worker( permissions: worker_permissions, main_module: module_specifier.clone(), worker_type, + close_on_idle: args.close_on_idle, maybe_worker_metadata, }); -- cgit v1.2.3