[][src]Macro stakker::idle

macro_rules! idle {
    ( $($x:tt)+ ) => { ... };
}

Perform an actor call or inline code when the thread becomes idle

The call syntax accepted is identical to the call! macro. However the [actor], ... form is not accepted because a Core reference is always needed. This queues calls to the idle queue which is run only when there is nothing left to run in the normal and lazy queues, and there is no I/O pending. This can be used to create backpressure in the case of processing overload, i.e. fetch more data only when all current data has been fully processed.

Implemented using Core::idle, Actor::apply and Actor::apply_prep.