futures-rs
futures-rs copied to clipboard
Zero-cost asynchronous programming in Rust
I noticed that recently send_all signature was updated to require TryStream bound on passed stream (https://github.com/rust-lang/futures-rs/pull/1946). I wonder if there is a reason for this restriction? Consider the following code...
A common situation in my current project is that I need to `select!` between the results of calling async methods on various things that might not exist. Unfortunately the select...
If you spawn a bunch of tasks on the threadpool from the main thread, and then the main thread concludes, the program will terminate before the threadpool's tasks have finished....
We should change `Spawn.spawn_obj` to `Spawn.spawn_boxed` which take a `BoxFuture` as param, and deprecate `FutureObj`, then remove it in future.
I think [`mpsc::Receiver::try_next`] should be renamed, since it conflicts with [`TryStreamExt::try_next`]. Since receiver is actually a `Stream` itself it's definitely confusing that there's two `try_next()`s that could apply that do...
Add recv method to `Receiver` how was done in std and tokio.
Searching through past issues didn't turn anything up, but it seems like a killer feature for streams would be, roughly, `async for x in stream { ... }`. While this...
The idea is, we want to get all items a `Stream` is ready to yield, without worrying about future items. We currently have `StreamExt::ready_chunks`, which can somewhat do this, but...
I _think_ `SinkExt::send()` is not cancel safe: 1. When `send()` is called, the [`item` is moved into a `Send`](https://github.com/rust-lang/futures-rs/blob/5ac72c751c406a525416ad56ead4009a5994b613/futures-util/src/sink/mod.rs#L224) (and from there into its inner `Feed`) 2. When the `Send`...
I am trying to write something to wait some time and check the async function is finished so I was using `FutureExt::now_or_never` but it is giving me unexpected output. The...