[package]
name = "affinitypool"
edition = "2024"
version = "0.4.0"
license = "MIT/Apache-2.0"
readme = "README.md"
description = "A Rust library for running blocking jobs on a dedicated thread pool with CPU core affinity"
repository = "https://github.com/surrealdb/affinitypool"
homepage = "https://github.com/surrealdb/affinitypool"
documentation = "https://docs.rs/affinitypool/"
keywords = ["pool", "parallelism", "threading", "thread", "threadpool"]
categories = ["asynchronous", "concurrency", "os"]
resolver = "2"
[features]
default = []
[dependencies]
crossbeam = "0.8.4"
num_cpus = "1.17.0"
parking_lot = "0.12.4"
thiserror = "2.0.16"
tokio = { version = "1.47.1", features = ["sync"] }
[target.'cfg(any(target_os = "android", target_os = "linux", target_os = "macos", target_os = "freebsd"))'.dependencies]
libc = "^0.2.176"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "^0.3.9", features = ["processthreadsapi", "winbase"] }
[dev-dependencies]
criterion = { version = "0.7", features = ["html_reports"] }
tokio = { version = "1.47.1", features = ["rt-multi-thread", "macros", "time"] }
[[bench]]
name = "threadpool"
harness = false