Skip to main content

ThreadPoolSource

Trait ThreadPoolSource 

Source
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§

Source

fn get_thread_id(&self) -> Option<String>

Get thread handle for cancellation

Source

fn is_thread_running(&self) -> bool

Check if thread is still running

Source

fn cancel_thread(&self) -> Result<(), String>

Cancel the background thread

Source

fn get_thread_status(&self) -> ThreadStatus

Get thread execution status

Source

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".

Implementors§