diff options
author | Satya Rohith <me@satyarohith.com> | 2024-03-13 22:52:25 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-13 17:22:25 +0000 |
commit | 0fd8f549e2194223eca2d4b17f4e96cd5a0f5fd5 (patch) | |
tree | 76181b2a5f2991134f7343cfc6d4b8b755dbc333 /runtime/worker_bootstrap.rs | |
parent | b3ca3b2f25931afb350027bde87dc3d4f9a741b0 (diff) |
fix(ext/node): allow automatic worker_thread termination (#22647)
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'runtime/worker_bootstrap.rs')
-rw-r--r-- | runtime/worker_bootstrap.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/worker_bootstrap.rs b/runtime/worker_bootstrap.rs index c019dae1a..e3e226b13 100644 --- a/runtime/worker_bootstrap.rs +++ b/runtime/worker_bootstrap.rs @@ -63,6 +63,7 @@ pub struct BootstrapOptions { pub disable_deprecated_api_warning: bool, pub verbose_deprecated_api_warning: bool, pub future: bool, + pub close_on_idle: bool, } impl Default for BootstrapOptions { @@ -94,6 +95,7 @@ impl Default for BootstrapOptions { disable_deprecated_api_warning: false, verbose_deprecated_api_warning: false, future: false, + close_on_idle: false, } } } @@ -129,6 +131,8 @@ struct BootstrapV8<'a>( bool, // future bool, + // close_on_idle + bool, ); impl BootstrapOptions { @@ -151,6 +155,7 @@ impl BootstrapOptions { self.disable_deprecated_api_warning, self.verbose_deprecated_api_warning, self.future, + self.close_on_idle, ); bootstrap.serialize(ser).unwrap() |