Concurrent iteration of AsyncStream
can 'leak' continuations
#71412
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
per its documention,
AsyncStream
nominally does not support concurrent iteration. in practice, however, this functionality exists and can be used. if one creates multiple iterators over a single underlyingAsyncStream
and uses them from differentTasks
, then termination of the stream may cause some number of the concurrent iterators to remain suspended indefinitely.Reproduction
Expected behavior
AsyncStream
should not allow concurrent iteration. attempting to do so should be either a compiler or runtime error, as it (sometimes) is withAsyncThrowingStream
.Environment
Additional information
related forums discussion
related existing bug report
The text was updated successfully, but these errors were encountered: