Skip to main content

worker_pool_init

Function worker_pool_init 

Source
pub fn worker_pool_init(
    worker_count: usize,
    queue_capacity: usize,
    handler: Arc<dyn Fn(String) + Send + Sync>,
) -> Result<WorkerPool<String>, WorkerPoolError>
Expand description

Creates the native string-work worker pool with bounded resources.

§Parameters

§Returns

Returns the successful value produced by crate::worker_pool::worker_pool_init or an error when the operation fails.

§Errors

Returns an error value when crate::worker_pool::worker_pool_init cannot complete successfully.

§Examples

ⓘ
let _result = pharos_runtime_core::worker_pool::worker_pool_init(todo!(), todo!(), todo!());