Skip to content

Commit

Permalink
streams: pipeline with signal
Browse files Browse the repository at this point in the history
Generators in pipeline must be able to be aborted or pipeline
can deadlock.
  • Loading branch information
ronag committed Jun 17, 2021
1 parent 842554f commit d9494c9
Show file tree
Hide file tree
Showing 36 changed files with 1,207 additions and 540 deletions.
2 changes: 1 addition & 1 deletion .github/SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resources:

* [Questions tagged 'node.js' on Stack Overflow](https://stackoverflow.com/questions/tagged/node.js)
* [#nodejs](https://openjs-foundation.slack.com/archives/CK9Q4MB53) channel on the OpenJS Foundation Slack ([join here](https://slack-invite.openjsf.org/))
* [#node.js channel on chat.freenode.net](https://webchat.freenode.net?channels=node.js&uio=d4)
* [#node.js channel on libera.chat](https://web.libera.chat?channels=node.js&uio=d4)
* [Node.js Slack Community](https://node-js.slack.com/)
* To register: [nodeslackers.com](https://www.nodeslackers.com/)

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V16.md#16.0.0">16.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.17.0">14.17.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.17.1">14.17.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.0">14.17.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.16.1">14.16.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.16.0">14.16.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.5">14.15.5</a><br/>
Expand Down
4 changes: 2 additions & 2 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -3863,7 +3863,7 @@ The supplied `callback` function is called with two arguments: `err` and
`derivedKey`. If an errors occurs while deriving the key, `err` will be set;
otherwise `err` will be `null`. The successfully generated `derivedKey` will
be passed to the callback as an {ArrayBuffer}. An error will be thrown if any
of the input aguments specify invalid values or types.
of the input arguments specify invalid values or types.

```mjs
const {
Expand Down Expand Up @@ -3911,7 +3911,7 @@ given `key`, `salt` and `info` are used with the `digest` to derive a key of

The successfully generated `derivedKey` will be returned as an {ArrayBuffer}.

An error will be thrown if any of the input aguments specify invalid values or
An error will be thrown if any of the input arguments specify invalid values or
types, or if the derived key cannot be generated.

```mjs
Expand Down
2 changes: 1 addition & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2502,7 +2502,7 @@ is flushed.
Use [`response.writableFinished`][] or [`response.writableEnded`][]
accordingly instead to avoid the ambiguity.

To maintain existing behaviour `response.finished` should be replaced with
To maintain existing behavior `response.finished` should be replaced with
`response.writableEnded`.

### DEP0137: Closing fs.FileHandle on garbage collection
Expand Down
25 changes: 23 additions & 2 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,12 +717,16 @@ STDERR/STDOUT, and the data's length is longer than the `maxBuffer` option.
<a id="ERR_CLOSED_MESSAGE_PORT"></a>
### `ERR_CLOSED_MESSAGE_PORT`
<!--
added: v16.2.0
added:
- v16.2.0
- v14.17.1
changes:
- version: 11.12.0
pr-url: https://github.com/nodejs/node/pull/26487
description: The error message was removed.
- version: v16.2.0
- version:
- v16.2.0
- v14.17.1
pr-url: https://github.com/nodejs/node/pull/38510
description: The error message was reintroduced.
-->
Expand Down Expand Up @@ -1003,6 +1007,22 @@ added: v15.0.0

An attempt to invoke an unsupported crypto operation was made.

<a id="ERR_DEBUGGER_ERROR"></a>
### `ERR_DEBUGGER_ERROR`
<!-- YAML
added: REPLACEME
-->

An error occurred with the [debugger][].

<a id="ERR_DEBUGGER_STARTUP_ERROR"></a>
### `ERR_DEBUGGER_STARTUP_ERROR`
<!-- YAML
added: REPLACEME
-->

The [debugger][] timed out waiting for the required host/port to be free.

<a id="ERR_DLOPEN_FAILED"></a>
### `ERR_DLOPEN_FAILED`
<!-- YAML
Expand Down Expand Up @@ -2828,6 +2848,7 @@ The native call from `process.cpuUsage` could not be processed.
[`util.getSystemErrorName(error.errno)`]: util.md#util_util_getsystemerrorname_err
[`zlib`]: zlib.md
[crypto digest algorithm]: crypto.md#crypto_crypto_gethashes
[debugger]: debugger.md
[define a custom subpath]: packages.md#packages_subpath_exports
[domains]: domain.md
[event emitter-based]: events.md#events_class_eventemitter
Expand Down
4 changes: 3 additions & 1 deletion doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -2318,7 +2318,9 @@ will result in a `TypeError` being thrown.
### `outgoingMessage.connection`
<!-- YAML
added: v0.3.0
deprecated: v15.12.0
deprecated:
- v15.12.0
- v14.17.1
-->

> Stability: 0 - Deprecated: Use [`outgoingMessage.socket`][] instead.
Expand Down
2 changes: 1 addition & 1 deletion doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3843,7 +3843,7 @@ for instance).
The compatibility API falls back to `host` if `:authority` is not
present. See [`request.authority`][] for more information. However,
if you don't use the compatibility API (or use `req.headers` directly),
you need to implement any fall-back behaviour yourself.
you need to implement any fall-back behavior yourself.

[ALPN Protocol ID]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
[ALPN negotiation]: #http2_alpn_negotiation
Expand Down
4 changes: 2 additions & 2 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5228,7 +5228,7 @@ avoid introducing causing memory leaks. However, if the `async_resource` is
garbage collected by JavaScript engine before the `napi_async_context` was
destroyed by `napi_async_destroy`, calling `napi_async_context` related APIs
like [`napi_open_callback_scope`][] and [`napi_make_callback`][] can cause
problems like loss of async context when using the `AsyncLocalStoage` API.
problems like loss of async context when using the `AsyncLocalStorage` API.

In order to retain ABI compatibility with previous versions, passing `NULL`
for `async_resource` does not result in an error. However, this is not
Expand Down Expand Up @@ -5731,7 +5731,7 @@ after receiving a return value of `napi_closing` in response to a call to
`napi_threadsafe_function` can be freed in its `napi_finalize` callback which
was passed to `napi_create_threadsafe_function()`. The parameter
`initial_thread_count` of `napi_create_threadsafe_function` marks the initial
number of aquisitions of the thread-safe functions, instead of calling
number of acquisitions of the thread-safe functions, instead of calling
`napi_acquire_threadsafe_function` multiple times at creation.

Once the number of threads making use of a `napi_threadsafe_function` reaches
Expand Down
Loading

0 comments on commit d9494c9

Please sign in to comment.