pub struct MultiThreadedExecutor { /* private fields */ }Expand description
Service / action / subscription / timer callbacks run on a resident worker
pool (ROS 2 MultiThreadedExecutor), subject to each
crate::runtime::CallbackGroup’s type.
Implementations§
Source§impl MultiThreadedExecutor
impl MultiThreadedExecutor
Sourcepub fn new(num_threads: usize) -> Self
pub fn new(num_threads: usize) -> Self
num_threads resident worker threads pulling from a shared job queue.
Sourcepub fn with_context(context: Context, num_threads: usize) -> Self
pub fn with_context(context: Context, num_threads: usize) -> Self
Like new, sharing context for ZMQ sockets.
pub fn handle(&self) -> &ExecutorHandle
pub fn add_node(&self, node: &mut Node) -> Result<()>
pub fn create_node(&self, name: impl Into<String>) -> Result<Node>
pub fn create_node_with_options( &self, name: impl Into<String>, options: NodeOptions, ) -> Result<Node>
pub fn create_node_with_context( &self, context: &Context, name: impl Into<String>, options: NodeOptions, ) -> Result<Node>
pub fn shutdown_handle(&self) -> Result<ShutdownHandle>
pub fn shutdown(&self) -> Result<()>
pub fn spin_once(&self, timeout: Option<Duration>) -> Result<bool>
pub fn spin_some(&self, timeout: Option<Duration>) -> Result<()>
pub fn spin(&self) -> Result<()>
pub fn start(&self) -> Result<()>
pub fn stop(&self) -> Result<()>
pub fn wait(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for MultiThreadedExecutor
impl Clone for MultiThreadedExecutor
Source§fn clone(&self) -> MultiThreadedExecutor
fn clone(&self) -> MultiThreadedExecutor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MultiThreadedExecutor
impl RefUnwindSafe for MultiThreadedExecutor
impl Send for MultiThreadedExecutor
impl Sync for MultiThreadedExecutor
impl Unpin for MultiThreadedExecutor
impl UnsafeUnpin for MultiThreadedExecutor
impl UnwindSafe for MultiThreadedExecutor
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