Trait task_pool::WorkProvider
source · pub trait WorkProvider: 'static + Send + Sync {
// Required methods
fn change_notifier(&self) -> &ChangeNotifier;
fn next_task(&self) -> Option<Box<dyn WorkUnit + '_>>;
}Expand description
A persistent source of work for multiple threads.
Required Methods§
sourcefn change_notifier(&self) -> &ChangeNotifier
fn change_notifier(&self) -> &ChangeNotifier
Gets a reference to the notifier which raises an event when new work is available.