Macro stakker::idle

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

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

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. The call syntax accepted is identical to the lazy! macro.

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