You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/advanced-topics/performance.mdx
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,18 +83,21 @@ are no one set of options that are going to work best.
83
83
84
84
### Thread priority on Linux systems
85
85
86
-
On Linux systems that support [`nice(2)`][], Piscina is capable of setting
86
+
On Unix systems that support [`nice(2)`][https://linux.die.net/man/2/nice] and Windows, Piscina is capable of setting
87
87
the priority of every worker in the pool. To use this mechanism, an additional
88
-
optional native addon dependency (`nice-napi`, `npm i nice-napi`) is required.
89
-
Once [`nice-napi`][] is installed, creating a `Piscina` instance with the
90
-
`niceIncrement` configuration option will set the priority for the pool:
88
+
optional native addon dependency (`@napi-rs/nice`, `npm i @napi-rs/nice`) is required.
89
+
Once [`@napi-rs/nice`][https://www.npmjs.com/package/@napi-rs/nice] is installed, creating a `Piscina`instance with the`niceIncrement` configuration option will set the priority for the pool:
Copy file name to clipboardExpand all lines: docs/docs/api-reference/class.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,9 +79,9 @@ This class extends [`EventEmitter`](https://nodejs.org/api/events.html) from Nod
79
79
alternative implementation. See [Custom Task Queues](https://github.com/piscinajs/piscina#custom_task_queues) for additional detail.
80
80
-`niceIncrement`: (`number`) An optional value that decreases priority for
81
81
the individual threads, i.e. the higher the value, the lower the priority
82
-
of the Worker threads. This value is only used on Linux and requires the
83
-
optional [`nice-napi`](https://npmjs.org/package/nice-napi) module to be installed.
84
-
See [`nice(2)`](https://linux.die.net/man/2/nice) for more details.
82
+
of the Worker threads. This value is used on Unix/Windows and requires the
83
+
optional [`@napi-rs/nice`](https://npmjs.org/package/@napi-rs/nice) module to be installed.
84
+
See [`nice(2)`](https://linux.die.net/man/2/nice)and [`SetThreadPriority`](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setthreadpriority)for more details.
85
85
-`trackUnmanagedFds`: (`boolean`) An optional setting that, when `true`, will
86
86
cause Workers to track file descriptors managed using `fs.open()` and
87
87
`fs.close()`, and will close them automatically when the Worker exits.
0 commit comments