Idle – idle handle

class uv.Idle(loop=None, callback=None)[source]

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

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 IO.

Raises:

uv.UVError – error during the initialization of the handle

Parameters:
  • loop (uv.Loop) – event loop which should be used for the handle
  • callback ((uv.Idle) -> None) – callback which should be called before prepare handles
callback

Callback which should be called before prepare handles.

callback(Idle-Handle)
Readonly:False
Type:(uv.Idle) -> None
start(callback=None)[source]

Starts the handle.

Raises:
Parameters:

callback ((uv.Idle) -> None) – callback which should be called before prepare handles

stop()[source]

Stops the handle, the callback will no longer be called.

Raises:uv.UVError – error while stopping the handle