Kevin Gibbons

Results 688 comments of Kevin Gibbons

> a call to a helper's `.return()` should just transparently forward it to the source iterator's `.return()` In addition to forwarding to the underlying iterator, we might want to also...

@benlesh Yeah, simplicity has a lot going for it. Maybe we could make concurrency here opt-in via a second parameter. Or maybe we could just let people do it themselves...

@benlesh That's good feedback. For some context, the reason this proposal is currently being held back is because we want to make sure there's room for adding consumer-driven concurrency at...

Ah, neat, thanks for the additional context. The thing proposed here would be something a bit different - from what I can tell, pumping a `flatMap` iterator in IxJS a...

The plan is for this kind of concurrency to be [order-preserving](https://github.com/tc39/proposal-async-iterator-helpers/issues/3), which means that the obvious choice is to pull from the current inner sequence until it's finished - any...

> You automatically get concurrent map/filter/etc. for free if `flatMap` is implemented with sufficient flexibility. Well, kind of, but that's more relevant to _producer-driven concurrency_ rather than _consumer-driven concurrency_. The...

Correction to the OP: rust's `futures` crate has a [`buffered`](https://docs.rs/futures/latest/futures/stream/trait.StreamExt.html#method.buffered) helper on Streams of Futures (think a sync iterator of Promises), which does in fact work almost exactly like the...

> Aren't Streams the out-of-order Iterators? No, ReadableStreams are ordered. And they have a lot of additional machinery on top of basic iteration, to handle backpressure and so on. Though...

If we stick to the consistency property in #3, I think it's pretty straightforward: errors get buffered like anything else, and don't get aggregated. If you get multiple errors from...

> What is the error that will be caught and when? I guess you'd say that it's `b` after 1000ms (after logging `a`), but that means there's unhandled promises (`b`...