Skip to content

Commit

Permalink
docs: Replace third-party AbortController usage with native one in ex…
Browse files Browse the repository at this point in the history
…ample (#554)
  • Loading branch information
JaoodxD authored May 3, 2024
1 parent a22d6d3 commit a94a7c5
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ an `EventEmitter`:
'use strict';

const Piscina = require('piscina');
const { AbortController } = require('abort-controller');
const { resolve } = require('path');

const piscina = new Piscina({
Expand All @@ -149,12 +148,6 @@ const piscina = new Piscina({
})();
```
To use `AbortController`, you will need to `npm i abort-controller`
(or `yarn add abort-controller`).
(In Node.js 15.0.0 or higher, there is a new built-in `AbortController`
implementation that can be used here as well.)
Alternatively, any `EventEmitter` that emits an `'abort'` event
may be used as an abort controller:
Expand Down

0 comments on commit a94a7c5

Please sign in to comment.