async icon indicating copy to clipboard operation
async copied to clipboard

Clarify `StreamQueue.next` will fail just after `hasNext` in API document.

Open Cat-sushi opened this issue 3 years ago • 0 comments

The API document of hasNext says,

Can be used before using next to avoid getting an error in the future returned by next in the case where there are no more events.

but, with using await q.hasNext, we can't avoid error from await q.next when q is shared by asynchronous functions.

See dart-lang/sdk#50217 in detail.

Cat-sushi avatar Oct 17 '22 21:10 Cat-sushi