Idle — Idle handle

class pyuv.Idle(loop)
Parameters:loop (Loop) – loop object where this handle runs (accessible through Idle.loop).

Idle handles will run the given callback once per loop iteration, right before the Prepare handles.

Note

The notable difference with Prepare handles is that when there are active Idle handles, the loop will perform a zero timeout poll instead of blocking for I/O.

Warning

Despite the name, Idle handles will get their callbacks called on every loop iteration, not when the loop is actually “idle”.

start(callback)
Parameters:callback (callable) – Function that will be called when the Idle handle is run by the event loop.

Start the Idle handle.

Callback signature: callback(idle_handle).

stop()

Stop the Idle handle.