You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If n=0 for StreamExt::buffer_unordered(n), then waiting for the stream to complete simply hangs, even if the stream itself is empty. This is a footgun (we ran into it when using len() as the argument to buffer_unordered).
As a breaking change, n could be of type NonZeroUsize instead of usize. As a non-breaking change, would it be possible to make the future complete immediately in the case where the actual underlying stream is empty?
The text was updated successfully, but these errors were encountered:
AFAIK, the hang here is not an actual hang of the method, but due to the returned future always returning Pending and you only waiting for that future. users of APIs such as select may depend on that behavior, so if we do it in 0.3 as a non-breaking change, it may cause another problem.
If
n=0
forStreamExt::buffer_unordered(n)
, then waiting for the stream to complete simply hangs, even if the stream itself is empty. This is a footgun (we ran into it when usinglen()
as the argument tobuffer_unordered
).As a breaking change,
n
could be of typeNonZeroUsize
instead ofusize
. As a non-breaking change, would it be possible to make the future complete immediately in the case where the actual underlying stream is empty?The text was updated successfully, but these errors were encountered: