Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'yarn'
cache: 'npm'
cache-dependency-path: docs/package.json

- name: Install Dependencies
run: |
cd docs
yarn install --frozen-lockfile
npm ci

- name: build
run: |
cd docs
yarn build
npm run build
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'yarn'
cache: 'npm'
cache-dependency-path: docs/package.json

- name: Install Dependencies
run: |
cd docs
yarn install --frozen-lockfile
npm ci

- name: build
run: |
cd docs
yarn build
npm run build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
Expand Down
22 changes: 3 additions & 19 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,21 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
### Installation

```
$ yarn
$ npm i
```

### Local Development

```
$ yarn start
$ npm run start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
$ npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
19 changes: 9 additions & 10 deletions docs/docs/api-reference/class.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ This class extends [`EventEmitter`](https://nodejs.org/api/events.html) from Nod
returning control to the main thread (avoid having open handles within a thread). If still want to have the possibility
of having open handles or handle asynchrnous tasks, you can set the environment variable `PISCINA_ENABLE_ASYNC_ATOMICS` to `1` or setting `options.atomics` to `async`.

** :::info
:::info
**Note**: The `async` mode comes with performance penalties and can lead to undesired behaviour if open handles are not tracked correctly.
Workers should be designed to wait for all operations to finish before returning control to the main thread, if any background operations are still running
`async` can be of help (e.g. for cache warming, etc).
:::
**

- `resourceLimits`: (`object`) See [Node.js new Worker options](https://nodejs.org/api/worker_threads.html#worker_threads_new_worker_filename_options)
- `maxOldGenerationSizeMb`: (`number`) The maximum size of each worker threads
main heap in MB.
Expand Down Expand Up @@ -110,17 +110,16 @@ This class extends [`EventEmitter`](https://nodejs.org/api/events.html) from Nod
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
result in the `Piscina` worker threads being unusable.
Use caution when setting resource limits. Setting limits that are too low may
result in the `Piscina` worker threads being unusable.
:::

** :::info
**Note on Explicit Resource Management**: Piscina does has support for `Symbol.dispose` and `Symbol.asyncDispose` for explicit resource management for its usage with the `using` keyword.
This is only avaiable on Node.js 24 and higher.
:::info
**Note on Explicit Resource Management**: Piscina does has support for `Symbol.dispose` and `Symbol.asyncDispose` for explicit resource management for its usage with the `using` keyword.
This is only avaiable on Node.js 24 and higher.

For more information, see the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management).
:::
**
For more information, see the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management).
:::

## `PiscinaHistogram`

Expand Down
Loading