Idle — Idle handle¶
- class pyuv.Idle(loop)¶
- Parameters:
loop (
Loop) – loop object where this handle runs (accessible throughIdle.loop).
Idlehandles will run the given callback once per loop iteration, right before thePreparehandles.Note
The notable difference with
Preparehandles is that when there are activeIdlehandles, the loop will perform a zero timeout poll instead of blocking for I/O.Warning
Despite the name,
Idlehandles 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
Idlehandle is run by the event loop.
Start the
Idlehandle.Callback signature:
callback(idle_handle).
- stop()¶
Stop the
Idlehandle.