| Crates.io | plunger |
| lib.rs | plunger |
| version | 0.1.0-rc.5 |
| created_at | 2025-08-25 13:32:52.887937+00 |
| updated_at | 2025-08-30 18:54:43.466769+00 |
| description | Plunger helps you quickly unblock your async tasks |
| homepage | |
| repository | https://github.com/conradludgate/plunger |
| max_upload_size | |
| id | 1809613 |
| size | 110,665 |
This crate is designed to help you run CPU intensive code in your async applications. It does so with 0 allocations per task, and intends to allow in-place initialisation of responses.
#[tokio::main]
async fn main() {
let hash = "$argon2i$v=19$m=65536,t=1,p=1$c29tZXNhbHQAAAAAAAAAAA$+r0d29hqEB0yasKr55ZgICsQGSkl0v0kgwhd+U3wyRo";
let password = "password";
plunger::unblock(move || password_auth::verify_password(password, hash))
.await
.unwrap();
}
While the intent is to unblock the async runtime, this API might have to defensively block the runtime if cancellation occurs while the task is running.
We assume the following: