pub trait ThreadPoolSource: StreamSourceTrait {
// Required methods
fn get_thread_id(&self) -> Option<String>;
fn is_thread_running(&self) -> bool;
fn cancel_thread(&self) -> Result<(), String>;
fn get_thread_status(&self) -> ThreadStatus;
fn set_timeout(&mut self, timeout_seconds: u32);
}Expand description
Trait for thread pool execution sources - background thread execution
Required Methods§
Sourcefn get_thread_id(&self) -> Option<String>
fn get_thread_id(&self) -> Option<String>
Get thread handle for cancellation
Sourcefn is_thread_running(&self) -> bool
fn is_thread_running(&self) -> bool
Check if thread is still running
Sourcefn cancel_thread(&self) -> Result<(), String>
fn cancel_thread(&self) -> Result<(), String>
Cancel the background thread
Sourcefn get_thread_status(&self) -> ThreadStatus
fn get_thread_status(&self) -> ThreadStatus
Get thread execution status
Sourcefn set_timeout(&mut self, timeout_seconds: u32)
fn set_timeout(&mut self, timeout_seconds: u32)
Set timeout for thread execution
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".