Executor

Struct Executor 

Source
pub struct Executor<'a, H: NodeHandler> { /* private fields */ }
Expand description

Runtime executor for planner-generated runtime plans.

use daedalus_runtime::executor::Executor;
use daedalus_planner::{ExecutionPlan, Graph};
use daedalus_runtime::RuntimePlan;

fn handler(
    _node: &daedalus_runtime::RuntimeNode,
    _ctx: &daedalus_runtime::state::ExecutionContext,
    _io: &mut daedalus_runtime::io::NodeIo,
) -> Result<(), daedalus_runtime::executor::NodeError> {
    Ok(())
}

let plan = RuntimePlan::from_execution(&ExecutionPlan::new(Graph::default(), vec![]));
let _exec = Executor::new(&plan, handler);

Implementations§

Source§

impl<'a, H: NodeHandler> Executor<'a, H>

Source

pub fn new(plan: &'a RuntimePlan, handler: H) -> Self

Build an executor from a runtime plan and handler.

Source

pub fn with_const_coercers(self, coercers: ConstCoercerMap) -> Self

Provide a shared constant coercer registry (used by dynamic plugins).

Source

pub fn with_output_movers(self, movers: OutputMoverMap) -> Self

Provide a shared output mover registry (used by dynamic plugins).

Source

pub fn with_state(self, state: StateStore) -> Self

Inject shared state store (optional).

Source

pub fn without_gpu(self) -> Self

Source

pub fn with_pool_size(self, size: Option<usize>) -> Self

Override pool size when using the pool-based parallel executor.

Source

pub fn with_metrics_level(self, level: MetricsLevel) -> Self

Source

pub fn with_host_bridges(self, mgr: HostBridgeManager) -> Self

Attach a host bridge manager to enable implicit host I/O nodes.

Source

pub fn reset(&mut self)

Reset per-run state (queues, telemetry, warnings) so this executor can be reused.

Source

pub fn run(self) -> Result<ExecutionTelemetry, ExecuteError>

Execute the runtime plan serially in segment order.

Source

pub fn run_in_place(&mut self) -> Result<ExecutionTelemetry, ExecuteError>

Execute the runtime plan serially without rebuilding the executor.

Source

pub fn run_parallel(self) -> Result<ExecutionTelemetry, ExecuteError>
where H: Send + Sync + 'static,

Execute the runtime plan allowing independent segments to run in parallel.

Source

pub fn run_parallel_in_place( &mut self, ) -> Result<ExecutionTelemetry, ExecuteError>
where H: Send + Sync + 'static,

Execute the runtime plan in parallel without rebuilding the executor.

Auto Trait Implementations§

§

impl<'a, H> Freeze for Executor<'a, H>

§

impl<'a, H> RefUnwindSafe for Executor<'a, H>
where H: RefUnwindSafe,

§

impl<'a, H> Send for Executor<'a, H>

§

impl<'a, H> Sync for Executor<'a, H>

§

impl<'a, H> Unpin for Executor<'a, H>

§

impl<'a, H> UnwindSafe for Executor<'a, H>
where H: RefUnwindSafe,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.