[package]
name = "affinitypool"
edition = "2024"
version = "0.5.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]
arc-swap = "1.7"
crossbeam = "0.8.4"
num_cpus = "1.17.0"
parking_lot = "0.12.4"
thiserror = "2.0.16"
[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"] }
[target.'cfg(not(loom))'.dev-dependencies]
criterion = { version = "0.8", features = ["html_reports"] }
tokio = { version = "1.47.1", features = ["rt-multi-thread", "macros", "time"] }
trybuild = "1.0"
[target.'cfg(loom)'.dev-dependencies]
loom = "0.7"
[[bench]]
name = "threadpool"
harness = false
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)'] }