Skip to main content

Module worker_pool

Module worker_pool 

Source
Expand description

Exposes the worker_pool runtime module.

§Examples

ⓘ
use pharos_native::runtime::worker_pool;

Structs§

WorkerPool
A bounded worker pool that executes an owned callback for each item.

Enums§

WorkerPoolError
Errors returned by bounded worker-pool lifecycle operations.

Constants§

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.