Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/current' into feat/async_atomics
Browse files Browse the repository at this point in the history
  • Loading branch information
metcoder95 committed Dec 4, 2024
2 parents 1bf9e5f + eda5671 commit 453ec66
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
5 changes: 3 additions & 2 deletions docs/docs/api-reference/class.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ This class extends [`EventEmitter`](https://nodejs.org/api/events.html) from Nod
- `workerHistogram`: (`boolean`) By default `false`. It will hint the Worker pool to record statistics for each individual Worker
- `loadBalancer`: ([`PiscinaLoadBalancer`](#piscinaloadbalancer)) By default, Piscina uses a least-busy algorithm. The `loadBalancer`
option can be used to provide an alternative implementation. See [Custom Load Balancers](../advanced-topics/loadbalancer.mdx) for additional detail.
- `workerHistogram`: (`boolean`) By default `false`. It will hint the Worker pool to record statistics for each individual Worker
- `loadBalancer`: ([`PiscinaLoadBalancer`](#piscinaloadbalancer)) By default, Piscina uses a least-busy algorithm. The `loadBalancer`
option can be used to provide an alternative implementation. See [Custom Load Balancers](../advanced-topics/loadbalancer.mdx) for additional detail.

:::caution
Use caution when setting resource limits. Setting limits that are too low may
Expand Down Expand Up @@ -152,7 +155,6 @@ interface PiscinaWorker {
### Example: Custom Load Balancer

#### JavaScript

<a id="custom-load-balancer-example-js"> </a>

```js
Expand Down Expand Up @@ -193,7 +195,6 @@ piscina
```

#### TypeScript

<a id="custom-load-balancer-example-ts"> </a>

```ts
Expand Down
6 changes: 3 additions & 3 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 15 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"tap": "^16.3.7",
"tinybench": "^3.0.0",
"ts-node": "^10.9.2",
"typescript": "5.6.3"
"typescript": "5.7.2"
},
"optionalDependencies": {
"@napi-rs/nice": "^1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/task_queue/array_queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class ArrayTaskQueue implements TaskQueue {
}

shift (): Task | null {
return this.tasks.shift() as Task;
return this.tasks.shift() ?? null;
}

push (task: Task): void {
Expand Down

0 comments on commit 453ec66

Please sign in to comment.