Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-07-16 15:38:21 +0300
committerJames M Snell <jasnell@gmail.com>2020-07-22 17:30:32 +0300
commit7603c7e50c3ae453db9702916f740618029020ba (patch)
treee1e520578d2a4911bae265cfd99413beca9d4163 /doc/api/worker_threads.md
parentf4f191bbc26c367ed8fa56c2d1297ef437c5f0fb (diff)
worker: set trackUnmanagedFds to true by default
This prevents accidental resource leaks when terminating or exiting Worker that own FDs opened through `fs.open()`. Refs: https://github.com/nodejs/node/pull/34303 PR-URL: https://github.com/nodejs/node/pull/34394 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'doc/api/worker_threads.md')
-rw-r--r--doc/api/worker_threads.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md
index 7162225c8b1..db00f7e713c 100644
--- a/doc/api/worker_threads.md
+++ b/doc/api/worker_threads.md
@@ -621,6 +621,9 @@ if (isMainThread) {
<!-- YAML
added: v10.5.0
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/34394
+ description: The `trackUnmanagedFds` option was set to `true` by default.
- version:
- v14.6.0
pr-url: https://github.com/nodejs/node/pull/34303
@@ -689,7 +692,7 @@ changes:
[`fs.close()`][], and close them when the Worker exits, similar to other
resources like network sockets or file descriptors managed through
the [`FileHandle`][] API. This option is automatically inherited by all
- nested `Worker`s. **Default**: `false`.
+ nested `Worker`s. **Default**: `true`.
* `transferList` {Object[]} If one or more `MessagePort`-like objects
are passed in `workerData`, a `transferList` is required for those
items or [`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`][] will be thrown.