Skip to main content

ExecutorBuilder

Struct ExecutorBuilder 

Source
pub struct ExecutorBuilder { /* private fields */ }
Expand description

Builder for Executor.

Implementations§

Source§

impl ExecutorBuilder

Source

pub const fn worker_threads(self, n: usize) -> Self

Number of worker threads. 0 → inline (no pool). Default → physical cores.

Source

pub fn observer(self, obs: Arc<dyn Observer>) -> Self

Attach a lifecycle observer. If not called, a no-op observer is used.

Source

pub fn monitor(self, mon: Arc<dyn ExecutionMonitor>) -> Self

Attach an execution monitor. If not called, a no-op monitor is used.

Source

pub fn worker_attrs(self, attrs: ThreadAttributes) -> Self

Set thread attributes (name prefix, CPU affinity, scheduling priority) for worker threads. Has no effect when worker_threads is 0 (inline mode). Requires the thread_attrs feature for non-default settings.

Source

pub fn build(self) -> Result<Executor, ExecutorError>

Build the Executor. Creates a fresh iceoryx2 node and wires up the internal stop-event service so that any Stoppable clone (taken before or after run()) will wake the WaitSet when stop() is called.

§Panics

Panics if the internally-generated stop-event service name exceeds the iceoryx2 service name length limit (this cannot happen under normal use because the name is derived from the process id and a monotonic counter).

Trait Implementations§

Source§

impl Default for ExecutorBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.