mirror of
https://github.com/denoland/deno.git
synced 2025-08-31 15:57:53 +00:00
fix(ext/node): allow automatic worker_thread termination (#22647)
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
This commit is contained in:
parent
b3ca3b2f25
commit
0fd8f549e2
11 changed files with 64 additions and 25 deletions
|
@ -211,6 +211,7 @@ class NodeWorker extends EventEmitter {
|
|||
permissions: null,
|
||||
name: this.#name,
|
||||
workerType: "module",
|
||||
closeOnIdle: true,
|
||||
},
|
||||
serializedWorkerMetadata,
|
||||
);
|
||||
|
@ -413,7 +414,7 @@ internals.__initWorkerThreads = (
|
|||
>();
|
||||
|
||||
parentPort = self as ParentPort;
|
||||
if (typeof maybeWorkerMetadata !== "undefined") {
|
||||
if (maybeWorkerMetadata) {
|
||||
const { 0: metadata, 1: _ } = maybeWorkerMetadata;
|
||||
workerData = metadata.workerData;
|
||||
environmentData = metadata.environmentData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue