Struct calloop::EventLoop[][src]

pub struct EventLoop<Data> { /* fields omitted */ }

An event loop

This loop can host several event sources, that can be dynamically added or removed.

Methods

impl<Data> EventLoop<Data>
[src]

Create a new event loop

It is backed by an mio provided machinnery, and will fail if the mio initialization fails.

Retrieve a loop handle

Dispatch pending events to their callbacks

Some source have events available, their callbacks will be immediatly called. Otherwise this will wait until an event is receive or the provided timeout is reached. If timeout is None, it will wait without a duration limit.

Once pending events have been processed or the timeout is reached, all pending idle callbacks will be fired before this method returns.

Auto Trait Implementations

impl<Data> !Send for EventLoop<Data>

impl<Data> !Sync for EventLoop<Data>