[][src]Struct sunrise_libuser::futures::WaitableManager

pub struct WaitableManager<'a> {
    work_queue: WorkQueue<'a>,
    registry: Arena<Task<'a>>,
}

The event loop manager. Waits on the waitable objects added to it.

Fields

work_queue: WorkQueue<'a>

Queue of things to do in the next "tick" of the event loop.

registry: Arena<Task<'a>>

List of futures that are currently running on this executor.

Implementations

impl<'a> WaitableManager<'a>[src]

pub fn new() -> WaitableManager<'a>[src]

Creates an empty event loop.

pub fn work_queue(&self) -> WorkQueue<'a>[src]

Returns a handle to the underlying WorkQueue backing this event loop. Can (and probably should be) passed to futures spawned on the event loop so they can wait on handles and spawn new futures themselves.

pub fn run(&mut self)[src]

Runs the event loop, popping items from the underlying WorkQueue and executing them. When there isn't any more work to do, we call syscalls::wait_synchronization() on all the handles that were registered through WorkQueue#WaitHandle. All the tasks that were waiting on the handle that got woken up will be polled again, resuming the event loop.

Returns when all the futures spawned on the loop have returned a value.

Trait Implementations

impl<'a> Debug for WaitableManager<'a>[src]

impl<'a> Default for WaitableManager<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for WaitableManager<'a>

impl<'a> !Send for WaitableManager<'a>

impl<'a> !Sync for WaitableManager<'a>

impl<'a> Unpin for WaitableManager<'a>

impl<'a> !UnwindSafe for WaitableManager<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SizedIPCBuffer for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.