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: #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 targos committed Aug 19, 2019
1 parent 2e50088 commit 5ea9237
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 5ea9237

Please sign in to comment.