pub struct WorkerScheduler { /* private fields */ }Expand description
Scheduler backed by a canonical rskit-worker pool configuration.
The scheduler is deterministic and does not create background work by itself.
Execution backpressure is enforced by the bounded Pool produced by WorkerScheduler::pool.
Implementations§
Source§impl WorkerScheduler
impl WorkerScheduler
Sourcepub fn new(pool_name: impl Into<String>, config: SchedulerConfig) -> Self
pub fn new(pool_name: impl Into<String>, config: SchedulerConfig) -> Self
Create a scheduler targeting a named worker pool.
Trait Implementations§
Source§impl Clone for WorkerScheduler
impl Clone for WorkerScheduler
Source§fn clone(&self) -> WorkerScheduler
fn clone(&self) -> WorkerScheduler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkerScheduler
impl Debug for WorkerScheduler
Source§impl Scheduler for WorkerScheduler
impl Scheduler for WorkerScheduler
Source§fn schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 TaskSpec,
) -> Pin<Box<dyn Future<Output = AppResult<SchedulingDecision>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 TaskSpec,
) -> Pin<Box<dyn Future<Output = AppResult<SchedulingDecision>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Decide where the task should execute.
Source§fn plan_batch<'life0, 'async_trait>(
&'life0 self,
batch: TaskBatch,
) -> Pin<Box<dyn Future<Output = AppResult<ExecutionPlan>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn plan_batch<'life0, 'async_trait>(
&'life0 self,
batch: TaskBatch,
) -> Pin<Box<dyn Future<Output = AppResult<ExecutionPlan>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Build an execution plan for a batch using a task stream.
Auto Trait Implementations§
impl Freeze for WorkerScheduler
impl RefUnwindSafe for WorkerScheduler
impl Send for WorkerScheduler
impl Sync for WorkerScheduler
impl Unpin for WorkerScheduler
impl UnsafeUnpin for WorkerScheduler
impl UnwindSafe for WorkerScheduler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more