Skip to content
Permalink
Browse files

doc: clarify async iterator leak

Clarifies that creating multiple async iterators from the same stream
can lead to event listener leak.

PR-URL: #28997
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information...
ronag authored and targos committed Aug 6, 2019
1 parent 2e50088 commit 5ea9237d2b3e418857fd1d4a6fa24b3262c9f985
Showing with 3 additions and 0 deletions.
  1. +3 −0 doc/api/stream.md
@@ -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

0 comments on commit 5ea9237

Please sign in to comment.
You can’t perform that action at this time.