|
@yoshuawuyts | |||||
|
New post: Streams Concurrency
In this post we talk about concurrency, apply it to streams, and explore future directions. Illustrated by @_lrlna.
blog.yoshuawuyts.com/streams-concur… pic.twitter.com/jJK78W2wOs
|
||||||
|
||||||
|
yosh
@yoshuawuyts
|
23. pro |
|
|
||
|
Daniel Carosone ⬡ 🇸🇪 🇮🇹 🇦🇺
@redtwitdown
|
23. pro |
|
Nice. For the "returning errors out of scopes" problem, could you feed each JoinHandle into a channel for a separate task to collect?
Sure, a (tokio-ish) stream map takes your example even further away from the sync case, but channels can show pipeline logic to error handling
|
||
|
|
||
|
yosh
@yoshuawuyts
|
23. pro |
|
Did you catch the gist I linked? gist.github.com/yoshuawuyts/18…
I think this gets us pretty close already — was this what you had in mind? Next step I'd like is to make this take the ParallelStream shape.
|
||
|
|
||
|
Peter of the Island of Ducks
@peidran
|
29. pro |
|
Thank you for doing this work. Your posts save me time and frustration.
|
||
|
|
||