[][src]Trait yaar_reactor::Reactor

pub trait Reactor: Sync {
    fn poll(&self, timeout: Option<Duration>) -> Result<NonZeroUsize, PollError>;
}

Abstraction over a backend for non-blocking and async io.

Required methods

fn poll(&self, timeout: Option<Duration>) -> Result<NonZeroUsize, PollError>

Poll for non-blocking IO and call wake() or equivalent for any wakers which were notified. Returns either the amount of wakers woken up or an error indicating timeout.

Loading content...

Implementors

Loading content...