pub trait Scheduler: Clone + Send + 'static {
    // Required methods
    fn run_topology(
        &self,
        topology: &mut Topology,
        main_channel: &Sender<FlowgraphMessage>
    ) -> Slab<Option<Sender<BlockMessage>>>;
    fn spawn<T: Send + 'static>(
        &self,
        future: impl Future<Output = T> + Send + 'static
    ) -> Task<T> ;
    fn spawn_blocking<T: Send + 'static>(
        &self,
        future: impl Future<Output = T> + Send + 'static
    ) -> Task<T> ;
}
Expand description

Scheduler trait

This has to be implemented for every scheduler.

Required Methods§

source

fn run_topology( &self, topology: &mut Topology, main_channel: &Sender<FlowgraphMessage> ) -> Slab<Option<Sender<BlockMessage>>>

Run a whole Flowgraph on the Runtime

source

fn spawn<T: Send + 'static>( &self, future: impl Future<Output = T> + Send + 'static ) -> Task<T>

Spawn a task

source

fn spawn_blocking<T: Send + 'static>( &self, future: impl Future<Output = T> + Send + 'static ) -> Task<T>

Spawn a blocking task in a separate thread

Object Safety§

This trait is not object safe.

Implementors§