Skip to content

Commit 057dfc7

Browse files
committed
feat!: enable stricter FIFO by default
1 parent f7f058e commit 057dfc7

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ This class extends [`EventEmitter`][] from Node.js.
466466
- `stricterFIFO`: (`boolean`) When `true`, tasks that cannot be dispatched
467467
immediately are returned to the front of the queue instead of the back.
468468
This avoids head-of-line blocking under sustained load (especially with a
469-
single worker). Defaults to `false`.
469+
single worker). Defaults to `true`.
470470

471471
Use caution when setting resource limits. Setting limits that are too low may
472472
result in the `Piscina` worker threads being unusable.

docs/docs/api-reference/class.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ This class extends [`EventEmitter`](https://nodejs.org/api/events.html) from Nod
105105
- `workerHistogram`: (`boolean`) By default `false`. It will hint the Worker pool to record statistics for each individual Worker
106106
- `loadBalancer`: ([`PiscinaLoadBalancer`](#piscinaloadbalancer)) By default, Piscina uses a least-busy algorithm. The `loadBalancer`
107107
option can be used to provide an alternative implementation. See [Custom Load Balancers](../advanced-topics/loadbalancer.mdx) for additional detail.
108+
- `stricterFIFO`: (`boolean`) When `true`, tasks that cannot be dispatched
109+
immediately are returned to the front of the queue instead of the back.
110+
This avoids head-of-line blocking under sustained load (especially with a
111+
single worker). Defaults to `true`.
108112

109113
:::caution
110114
Use caution when setting resource limits. Setting limits that are too low may

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const kDefaultOptions : FilledOptions = {
124124
trackUnmanagedFds: true,
125125
closeTimeout: 30000,
126126
recordTiming: true,
127-
stricterFIFO: false,
127+
stricterFIFO: true,
128128
workerHistogram: false
129129
};
130130

0 commit comments

Comments
 (0)