async-std
async-std copied to clipboard
Async version of the Rust standard library
I was wondering if there is any ability, or plans, to support setting the maximum number of threads for the global executor? I see the `num_cpus` is used [here](https://github.com/async-rs/async-std/blob/8ea920c9f05f00fd8cc17c7e70ed5676e9a969ad/src/task/executor/pool.rs#L28) which...
[This example](https://docs.rs/async-std/latest/async_std/net/struct.TcpListener.html#method.incoming) only shows to write a byte slice to stream, but how to read from the stream?
On an async_std::net::UdpSocket I occasionally need to `recvmsg`. This is not exposed by async_std, and would barely be a reasonable request, given that std doesn't expose it either. It is...
## Steps to reproduce - `futures-preview = { version = "0.3.0-alpha.19", features = [ "async-await" ] }` in `Cargo.toml` as recommended in §3.1. - Try to build the example in...
Found another minor documentation error. Yay :) Maybe I'm missing something, but [`fs::rename()`](https://docs.rs/async-std/latest/async_std/fs/fn.rename.html)'s docs also have the wrong behavior documented: >If a file or directory already exists at the target...
I am using the `spawn_and_log_error` function from the `a-chat` example. Unfortunately, this function is not able to capture panics in the spawned tasked. The `async-std ` book mentions that catching...
So... correct me if I'm wrong, but [`fs::create_dir_all()`](https://docs.rs/async-std/latest/async_std/fs/fn.create_dir_all.html)'s docs seems to have a minor issue - it has the wrong behavior documented: >An error will be returned in the following...
As the title suggest std has a `impl AsFd for UnixStream`, this requires bumping msrv to 1.63 or using the io_lifetimes crate
Something that came up today was the question how to read and write bytes with using a certain endianness. @goto-bus-stop replied in chat with the following: ```rust let mut bytes...
If I have a where clause like: ```rust #[async_std::test] pub fn run_test() where MyType: MyTrait { ... } ``` The macro expansion of this test eats the where clause. This...