Skip to content

Commit 5ea9237

Browse files
ronagtargos
authored andcommitted
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 <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 2e50088 commit 5ea9237

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/stream.md

+3
Original file line numberDiff line numberDiff line change
@@ -2502,6 +2502,9 @@ and async iterators are provided below.
25022502
})();
25032503
```
25042504

2505+
Async iterators register a permanent error handler on the stream to prevent any
2506+
unhandled post-destroy errors.
2507+
25052508
#### Creating Readable Streams with Async Generators
25062509

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

0 commit comments

Comments
 (0)