blocking icon indicating copy to clipboard operation
blocking copied to clipboard

A thread pool for isolating blocking I/O in async programs

Results 10 blocking issues
Sort by recently updated
recently updated
newest added

Thanks for making this library. I'm using it as a dependency of Tide: [`tide`](https://crates.io/crates/tide) -> [`async-std`](https://crates.io/crates/async-std) -> [`async-global-executor`](https://crates.io/crates/async-global-executor) -> `blocking` I'm running an API server in a VM which has...

At `gitoxide`, a git implementation in Rust, most code is blocking as it relies heavily on operations which aren't available in 'real' async or are CPU bound. When implementing the...

See smol-rs/async-io#93. With the new release of `once_cell`, we no longer compile on 1.47. ``` cargo +1.47 check warning: unused manifest key: package.rust-version error: failed to download `once_cell v1.15.0` Caused...

This PR resolves #24 by making it so the `grow_pool()` function doesn't panic when it is unable to spawn a new thread.

For some reason I cannot just `Unblock::new()` a TcpStream to offload it to a thread pool. I need it because I want to target Windows platform.

While reviewing the code, I noticed a potential issue with `poll_write` when handling write requests. If a write operation fails, the error is only logged in the task and the...

The `Cargo.toml` specifies: ```toml async-task = "4.0.2" ``` but `blocking` uses `async_task::Builder`, which was only added to `async_task` in [v4.4.0](https://github.com/smol-rs/async-task/releases/tag/v4.4.0). https://github.com/smol-rs/blocking/blob/0af62f84bc25b317594552c0a796199137a55d7c/src/lib.rs#L218-L219 This can cause projects which use `blocking` (even indirectly...

Hi, I stumbled across this crate from my GitHub timeline, interesting repo! When I read the README, my first thought was that my previous solution to this problem was to...

I am looking for a way to ditch the tokio requirement for a library that use reqwest (Mostly compile times and Send + 'static annoyances), and I'm wondering if unblock...

I think the document can be improved with some clarification since the `unblock()` ``` pub fn unblock(f: F) -> Task where F: FnOnce() -> T + Send + 'static, T:...