pub trait Source: Send + 'static {
type Item: ArconType;
/// Poll Source for an Item
fn poll_next(&mut self) -> SourceResult<Poll<Self::Item>>;
/// Set offset for the source
///
/// May be used by replayable sources to set a certain offset..
fn set_offset(&mut self, offset: usize);
}
My guess is that most sources that we and others implement will be async/await in Rust.
By having it async and using cooperative scheduling on a single core between a Source and operator(s), we will utilise the CPU much better compared to a blocking approach.
As of now, source polling is not
async
.My guess is that most sources that we and others implement will be
async/await
in Rust.By having it async and using cooperative scheduling on a single core between a Source and operator(s), we will utilise the CPU much better compared to a blocking approach.
Related to #277