Skip to content

Commit

Permalink
doc: clarify async iterator leak
Browse files Browse the repository at this point in the history
Clarifies that creating multiple async iterators from the same stream
can lead to event listener leak.

PR-URL: nodejs#28997
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
ronag authored and Trott committed Aug 12, 2019
1 parent f985a25 commit d7a4ace
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -2502,6 +2502,9 @@ and async iterators are provided below.
})();
```

Async iterators register a permanent error handler on the stream to prevent any
unhandled post-destroy errors.

#### Creating Readable Streams with Async Generators

We can construct a Node.js Readable Stream from an asynchronous generator
Expand Down

0 comments on commit d7a4ace

Please sign in to comment.