Struct easyfibers::Runner [] [src]

pub struct Runner<P, R> { /* fields omitted */ }

Runner executes fibers on main stack. There can be multiple pollers each with its own fibers of a particular type.

Methods

impl<P, R> Runner<P, R>
[src]

Start runner. This function does not block. Can fail only if we ran out of space for new runners. ATM max runners is 20.

Execute fibers and timers. Returns true if anything changed and you should call pop_response and pop_fiber.

Set wait to maximum amount of time poller should wait for sockets to wake up. This affects socket timers so do not set it too large. Recommended values between 0 (if you have something else to do) and 250.

Get a response from fiber if any available.

Get a fiber if any that has called join_main and is blocking waiting for main stack to resume it.

Resolve domain, connect and run fiber. In case domain resolve or connect fails, fiber will still be run but all socket operations will fail.

Start fiber on TCP socket.

This function does not block and fiber gets executed on next poll().

Start fiber on TCP listener.

This function does not block and fiber gets executed on next poll().

Start fiber on UDP socket.

This function does not block and fiber gets executed on next poll().

Return resp after dur. Timer is one-shot.

Run socket-less fiber after dur.

Trait Implementations

impl<P, R> Drop for Runner<P, R>
[src]

A method called when the value goes out of scope. Read more