pub struct DefaultTaskScheduler { /* private fields */ }Expand description
Default task scheduler implementation
Provides a comprehensive scheduling implementation with configurable algorithms, priority handling, dependency resolution, and queue management.
Implementations§
Source§impl DefaultTaskScheduler
impl DefaultTaskScheduler
Sourcepub fn new(config: SchedulerConfig) -> Self
pub fn new(config: SchedulerConfig) -> Self
Create a new default task scheduler
Trait Implementations§
Source§impl TaskScheduler for DefaultTaskScheduler
impl TaskScheduler for DefaultTaskScheduler
Source§fn schedule_task(&mut self, task: ExecutionTask) -> SklResult<TaskHandle>
fn schedule_task(&mut self, task: ExecutionTask) -> SklResult<TaskHandle>
Schedule a single task for execution Read more
Source§fn schedule_batch(
&mut self,
tasks: Vec<ExecutionTask>,
) -> SklResult<Vec<TaskHandle>>
fn schedule_batch( &mut self, tasks: Vec<ExecutionTask>, ) -> SklResult<Vec<TaskHandle>>
Schedule multiple tasks as a batch Read more
Source§fn cancel_task(&mut self, handle: TaskHandle) -> SklResult<()>
fn cancel_task(&mut self, handle: TaskHandle) -> SklResult<()>
Cancel a scheduled task Read more
Source§fn get_status(&self) -> SchedulerStatus
fn get_status(&self) -> SchedulerStatus
Get current scheduler status and metrics Read more
Source§fn update_config(&mut self, config: SchedulerConfig) -> SklResult<()>
fn update_config(&mut self, config: SchedulerConfig) -> SklResult<()>
Update scheduler configuration Read more
Source§async fn shutdown_gracefully(&mut self) -> SklResult<()>
async fn shutdown_gracefully(&mut self) -> SklResult<()>
Shutdown scheduler gracefully Read more
Source§fn get_next_task(&mut self) -> Option<(ExecutionTask, TaskHandle)>
fn get_next_task(&mut self) -> Option<(ExecutionTask, TaskHandle)>
Get next task to execute (for scheduler implementations)
Source§fn mark_task_completed(&mut self, handle: &TaskHandle) -> SklResult<()>
fn mark_task_completed(&mut self, handle: &TaskHandle) -> SklResult<()>
Mark task as completed
Source§fn mark_task_failed(
&mut self,
handle: &TaskHandle,
_error: String,
) -> SklResult<()>
fn mark_task_failed( &mut self, handle: &TaskHandle, _error: String, ) -> SklResult<()>
Mark task as failed
Auto Trait Implementations§
impl Freeze for DefaultTaskScheduler
impl !RefUnwindSafe for DefaultTaskScheduler
impl Send for DefaultTaskScheduler
impl Sync for DefaultTaskScheduler
impl Unpin for DefaultTaskScheduler
impl !UnwindSafe for DefaultTaskScheduler
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