pub struct WorkerSubsystem { /* private fields */ }Expand description
Priority Worker Pool Subsystem
Implementations§
Source§impl WorkerSubsystem
impl WorkerSubsystem
pub fn new(config: WorkerConfig, engine: StandardEngine) -> Self
Sourcepub fn get_scheduler(&self) -> SchedulerService
pub fn get_scheduler(&self) -> SchedulerService
Get the scheduler client
Sourcepub fn cancel_task(&self, handle: TaskHandle) -> Result<()>
pub fn cancel_task(&self, handle: TaskHandle) -> Result<()>
Cancel a scheduled task
Sourcepub fn active_workers(&self) -> usize
pub fn active_workers(&self) -> usize
Get number of active workers
Sourcepub fn queued_tasks(&self) -> usize
pub fn queued_tasks(&self) -> usize
Get number of queued tasks
Trait Implementations§
Source§impl Drop for WorkerSubsystem
impl Drop for WorkerSubsystem
Source§impl HasVersion for WorkerSubsystem
impl HasVersion for WorkerSubsystem
Source§fn version(&self) -> SystemVersion
fn version(&self) -> SystemVersion
Returns the version information for this component
Source§impl Scheduler for WorkerSubsystem
impl Scheduler for WorkerSubsystem
Source§impl Subsystem for WorkerSubsystem
impl Subsystem for WorkerSubsystem
Source§fn is_running(&self) -> bool
fn is_running(&self) -> bool
Check if the subsystem is currently running
Source§fn health_status(&self) -> HealthStatus
fn health_status(&self) -> HealthStatus
Get the current health status of the subsystem Read more
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Get a mutable reference to self as Any for downcasting
Auto Trait Implementations§
impl Freeze for WorkerSubsystem
impl !RefUnwindSafe for WorkerSubsystem
impl Send for WorkerSubsystem
impl Sync for WorkerSubsystem
impl Unpin for WorkerSubsystem
impl !UnwindSafe for WorkerSubsystem
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