Skip to main content

worker_pool_thread_main

Function worker_pool_thread_main 

Source
pub fn worker_pool_thread_main<T>(
    receiver: Arc<Mutex<Receiver<T>>>,
    shutdown: Arc<Atomic<bool>>,
    handler: Arc<dyn Fn(T) + Send + Sync>,
)
where T: Send + 'static,
Expand description

Executes one worker thread main-loop with bounded recv polling and cooperative shutdown.

§Parameters

§Returns

Returns after crate::worker_pool::worker_pool_thread_main applies its in-place effect.

§Examples

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