1
0
Fork
You've already forked async-cpupool
0
  • Rust 98.6%
  • Nix 1.4%
2026年01月13日 16:14:30 -06:00
.forgejo/workflows Add loom to CI 2024年04月17日 13:10:06 -05:00
examples Instrument for loom 2024年04月15日 17:59:13 -05:00
src Use clone_from on wakers 2024年07月09日 15:50:17 -05:00
tests Move notify tests to tests directory 2024年04月17日 13:05:12 -05:00
.gitignore Simple CPU Pool 2023年11月24日 13:42:10 -06:00
Cargo.toml v0.4.0 2026年01月13日 16:14:30 -06:00
flake.lock nixos 25.11 2026年01月11日 22:12:57 -06:00
flake.nix nixos 25.11 2026年01月11日 22:12:57 -06:00
LICENSE Add license, readme, docs, & error impls 2023年11月25日 21:08:15 -06:00
README.md Update cargo.toml 2023年11月25日 21:13:49 -06:00

Async CPUPool

A simple async threadpool for CPU-bound tasks

Usage

Add to your Cargo.toml

$ cargo add async-cpupool

Use in your application

fn complex_computation(){}fn main()-> Result<(),Box<dynstd::error::Error>>{smol::block_on(async{letpool=async_cpupool::CpuPool::new();pool.spawn(move||{complex_computation();}).await?;pool.close().await;Ok(())})}

Contributing

Feel free to open issues for anything you find an issue with. Please note that any contributed code will be licensed under the GPLv3.

License

Copyright © 2023 asonix

Async CPUPool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Async CPUPool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This file is part of Async CPUPool.

You should have received a copy of the GNU General Public License along with Async CPUPool. If not, see http://www.gnu.org/licenses/.