Struct ThreadManager
pub struct ThreadManager { /* private fields */ }Expand description
Thread management component implementation
Implementations§
§impl ThreadManager
impl ThreadManager
pub fn new(max_threads: usize) -> ThreadManager
pub fn new(max_threads: usize) -> ThreadManager
Create a new thread manager
Trait Implementations§
§impl Debug for ThreadManager
impl Debug for ThreadManager
§impl NerveComponent for ThreadManager
impl NerveComponent for ThreadManager
§fn id(&self) -> &ComponentId
fn id(&self) -> &ComponentId
Get component identifier
§fn component_type(&self) -> ComponentType
fn component_type(&self) -> ComponentType
Get component type
§fn is_healthy(&self) -> bool
fn is_healthy(&self) -> bool
Check if component is healthy
§fn get_statistics(&self) -> SystemStatistics
fn get_statistics(&self) -> SystemStatistics
Get component statistics
§fn reset_statistics(&mut self)
fn reset_statistics(&mut self)
Reset component statistics
§fn shutdown(&mut self) -> Result<(), NerveError>
fn shutdown(&mut self) -> Result<(), NerveError>
Shutdown the component
§impl ThreadComponent for ThreadManager
impl ThreadComponent for ThreadManager
§fn create_lifecycle(&self) -> Result<Box<dyn ThreadLifecycle>, NerveError>
fn create_lifecycle(&self) -> Result<Box<dyn ThreadLifecycle>, NerveError>
Create a new thread lifecycle manager
§fn create_watchdog(
&self,
heartbeat_interval: Duration,
) -> Result<Box<dyn ThreadWatchdog>, NerveError>
fn create_watchdog( &self, heartbeat_interval: Duration, ) -> Result<Box<dyn ThreadWatchdog>, NerveError>
Create a thread watchdog
§fn create_coordinator(&self) -> Result<Box<dyn ThreadCoordinator>, NerveError>
fn create_coordinator(&self) -> Result<Box<dyn ThreadCoordinator>, NerveError>
Create a thread coordinator
§fn thread_count(&self) -> usize
fn thread_count(&self) -> usize
Get current thread count
§fn max_threads(&self) -> usize
fn max_threads(&self) -> usize
Get maximum allowed threads
§fn thread_utilization(&self) -> f64
fn thread_utilization(&self) -> f64
Get thread utilization percentage
Auto Trait Implementations§
impl Freeze for ThreadManager
impl RefUnwindSafe for ThreadManager
impl Send for ThreadManager
impl Sync for ThreadManager
impl Unpin for ThreadManager
impl UnwindSafe for ThreadManager
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