Skip to main content

AccelStream

Trait AccelStream 

Source
pub trait AccelStream:
    Send
    + Sync
    + 'static {
    type Backend: AccelBackend;

    // Required methods
    fn record_event(
        &self,
    ) -> Result<<Self::Backend as AccelBackend>::Event, AccelError>;
    fn wait_event(
        &self,
        event: &<Self::Backend as AccelBackend>::Event,
    ) -> Result<(), AccelError>;
}
Expand description

Stream / queue contract: ordered submission of work, plus the ability to record an event for cross-stream synchronization.

Required Associated Types§

Required Methods§

Source

fn record_event( &self, ) -> Result<<Self::Backend as AccelBackend>::Event, AccelError>

Record an event into this stream. Other streams can wait on the resulting handle via AccelStream::wait_event.

Source

fn wait_event( &self, event: &<Self::Backend as AccelBackend>::Event, ) -> Result<(), AccelError>

Wait on an event recorded into another stream before scheduling further work on this one. Backends without cross-queue events synthesize a host-side block.

Implementors§