Expand description
Provides the worker_pool module.
§Examples
ⓘ
use pharos_runtime_core::worker_pool;§Related
cratefor sibling modules in the same crate. Bounded native worker-pool primitives for runtime request orchestration.
The pool owns its channel and worker joins, rejects work after shutdown, and never uses an unbounded queue or an unsafe FFI bridge.
Structs§
- Worker
Pool - A bounded worker pool that executes an owned callback for each item.
Enums§
- Worker
Pool Error - Errors returned by bounded worker-pool lifecycle operations.
Constants§
- MAX_
QUEUE_ 🔒CAPACITY - MAX_
WORKERS 🔒 - PHAROS_
NATIVE_ WORK_ QUEUE_ BYTES_ PER_ SLOT - Approximate queue-memory accounting unit used for bounded work sizing.
Functions§
- worker_
pool_ destroy - Destroys a string worker pool after joining its workers.
- worker_
pool_ enqueue - Enqueues one string request and fails when the bounded queue is closed.
- worker_
pool_ init - Creates the native string-work worker pool with bounded resources.
- worker_
pool_ join - Joins every worker after shutdown.
- worker_
pool_ request_ shutdown - Requests shutdown of a string worker pool.
- worker_
pool_ thread_ main - Executes one worker thread main-loop with bounded recv polling and cooperative shutdown.