multipool

Crates.iomultipool
lib.rsmultipool
version
sourcesrc
created_at2024-12-10 19:30:35.523821
updated_at2024-12-12 18:39:07.548797
descriptionA configurable thread pool with optional work-stealing support and task priority scheduling.
homepage
repositoryhttps://github.com/ndranathunga/multipool
max_upload_size
id1478971
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Nisal D Ranathunga (ndranathunga)

documentation

https://docs.rs/multipool

README

Multipool

rustc License Crates.io Docs

Multipool is a Rust library that provides a configurable and efficient thread pool with optional work-stealing capabilities. It allows you to easily spawn tasks and handle concurrent workloads, while also offering a builder API to customize the number of threads and choose between the global queue or the work-stealing mode.

Features

  • Configurable Threads: Specify the number of worker threads for concurrent task handling.
  • Global Queue or Work-Stealing: Choose between simple global queues or efficient work-stealing for load balancing.
  • Priority Scheduling: Assign priorities to tasks for more control over execution order.
  • Metrics and Monitoring: Track active threads, queued tasks, running tasks and completed tasks in real-time.
  • Macros: Simplify task submission, metrics logging, and thread pool creation with ergonomic macros.
  • Typed-State Builder Pattern: The ThreadPoolBuilder ensures that thread pools are built correctly with a strongly-typed API, enforcing valid combinations of features like priority scheduling and work-stealing.
  • Graceful Shutdown: Cleanly shut down the thread pool while ensuring that all tasks are completed.
  • Customizable Metrics Collector: Integrate your own metrics collection logic for application-specific monitoring and analytics.

Installation

Add multipool as a dependency in your Cargo.toml:

[dependencies]
multipool = "0.2"

Documentation

Feedback

If you encounter any issues or have feature requests, please open an issue in the GitHub repository issues.

Commit count: 50

cargo fmt