pub struct DistributedScheduler { /* private fields */ }Expand description
Comprehensive distributed task scheduler
Implementations§
Source§impl DistributedScheduler
impl DistributedScheduler
Sourcepub fn new() -> CoreResult<Self>
pub fn new() -> CoreResult<Self>
Create new distributed scheduler
Sourcepub fn global() -> CoreResult<Arc<Self>>
pub fn global() -> CoreResult<Arc<Self>>
Get global scheduler instance
Sourcepub fn submit_task(&self, task: DistributedTask) -> CoreResult<TaskId>
pub fn submit_task(&self, task: DistributedTask) -> CoreResult<TaskId>
Submit task to scheduler
Sourcepub fn get_pending_task_count(&self) -> CoreResult<usize>
pub fn get_pending_task_count(&self) -> CoreResult<usize>
Get pending task count
Sourcepub fn schedule_next(
&self,
availablenodes: &[NodeInfo],
) -> CoreResult<Vec<TaskAssignment>>
pub fn schedule_next( &self, availablenodes: &[NodeInfo], ) -> CoreResult<Vec<TaskAssignment>>
Schedule next batch of tasks
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DistributedScheduler
impl RefUnwindSafe for DistributedScheduler
impl Send for DistributedScheduler
impl Sync for DistributedScheduler
impl Unpin for DistributedScheduler
impl UnwindSafe for DistributedScheduler
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more