https://github.com/surrealdb/affinitypool
A Rust library for running blocking jobs on a dedicated thread pool with CPU core affinity per thread
https://github.com/surrealdb/affinitypool
surreal surrealdb thread-pool threadpool
Last synced: 3 months ago
JSON representation
A Rust library for running blocking jobs on a dedicated thread pool with CPU core affinity per thread
- Host: GitHub
- URL: https://github.com/surrealdb/affinitypool
- Owner: surrealdb
- License: apache-2.0
- Created: 2025-01-06T06:42:57.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T22:12:38.000Z (6 months ago)
- Last Synced: 2025-06-30T07:19:05.286Z (3 months ago)
- Topics: surreal, surrealdb, thread-pool, threadpool
- Language: Rust
- Homepage: https://surrealdb.com
- Size: 37.1 KB
- Stars: 6
- Watchers: 12
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# affinitypool
A threadpool for running blocking jobs on a dedicated thread pool. Blocking tasks can be sent asynchronously to the pool, where the task will be queued until a worker thread is free to process the task. Tasks are processed in a FIFO order.
For optimised workloads, the affinity of each thread can be specified, ensuring that each thread can request to be pinned to a certain CPU core, allowing for more parallelism, and better performance guarantees for blocking workloads.
#### Original
This code is heavily inspired by [threadpool](https://crates.io/crates/threadpool), licensed under the Apache License 2.0 and MIT licenses.