[package]
edition = "2024"
name = "affinitypool"
version = "0.6.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A Rust library for running blocking jobs on a dedicated thread pool with CPU core affinity"
homepage = "https://github.com/surrealdb/affinitypool"
documentation = "https://docs.rs/affinitypool/"
readme = "README.md"
keywords = [
"pool",
"parallelism",
"threading",
"thread",
"threadpool",
]
categories = [
"asynchronous",
"concurrency",
"os",
]
license = "MIT/Apache-2.0"
repository = "https://github.com/surrealdb/affinitypool"
resolver = "2"
[features]
default = []
[lib]
name = "affinitypool"
path = "src/lib.rs"
[[example]]
name = "alloc_count"
path = "examples/alloc_count.rs"
[[test]]
name = "async_task_smoke"
path = "tests/async_task_smoke.rs"
[[test]]
name = "loom_queue"
path = "tests/loom_queue.rs"
[[test]]
name = "threadpool_tests"
path = "tests/threadpool_tests.rs"
[[bench]]
name = "high_load"
path = "benches/high_load.rs"
harness = false
[[bench]]
name = "microbench"
path = "benches/microbench.rs"
harness = false
[[bench]]
name = "threadpool"
path = "benches/threadpool.rs"
harness = false
[[bench]]
name = "vs_tokio"
path = "benches/vs_tokio.rs"
harness = false
[dependencies.async-task]
version = "4"
[dependencies.num_cpus]
version = "1.17.0"
[dependencies.parking_lot]
version = "0.12.5"
[dependencies.thiserror]
version = "2.0.18"
[target.'cfg(any(target_os = "android", target_os = "linux", target_os = "macos", target_os = "freebsd"))'.dependencies.libc]
version = "^0.2.186"
[target."cfg(loom)".dev-dependencies.loom]
version = "0.7"
[target."cfg(not(loom))".dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]
[target."cfg(not(loom))".dev-dependencies.tokio]
version = "1.52.3"
features = [
"rt-multi-thread",
"macros",
"time",
]
[target."cfg(not(loom))".dev-dependencies.trybuild]
version = "1.0"
[target.'cfg(target_os = "windows")'.dependencies.winapi]
version = "^0.3.9"
features = [
"processthreadsapi",
"winbase",
]
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(loom)"]