Relative Content

Tag Archive for rustasync-awaitrust-tokio

try_join multiple vecs of Futures of different types

We have a finite number of vecs (unknown length) of futures. Each vec of futures has a different Result type, so we cannot just flatten them. We would like to do something like try_join where we wait until one returns an error, or all of them return successfully.

try_join multiple vecs of Futures of different types

We have a finite number of vecs (unknown length) of futures. Each vec of futures has a different Result type, so we cannot just flatten them. We would like to do something like try_join where we wait until one returns an error, or all of them return successfully.

tokio::task::spawn and non-Send objects in async context

I am struggling to wrap my head around Send and the async context. At present, I am interacting with solana-sdk which has a Signature object which does not implement Send. I interact with this library in an async context in new tasks spawned in tokio.