Skip to main content

LaneFeed

Trait LaneFeed 

Source
pub trait LaneFeed: Sync {
    // Required method
    fn next(
        &self,
        first_index: usize,
        wait: Duration,
    ) -> Vec<(Arc<dyn WorkerLane>, RateModel)>;
}
Expand description

A source of lanes that join a run in progress (see LanePool::run_into_fed).

Required Methods§

Source

fn next( &self, first_index: usize, wait: Duration, ) -> Vec<(Arc<dyn WorkerLane>, RateModel)>

Waits up to wait for lanes to add and returns them with their starting rate models, or an empty list. The first returned lane gets the event index first_index, the next one first_index + 1, and so on, so an implementation can set up whatever it keys by lane index before the lane starts.

Called repeatedly from one thread until the run ends; lanes returned after the last lane has left are dropped unused.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§