Prepare – poll handle

class uv.Prepare(loop=None, on_prepare=None)[source]

Prepare handles will run the given callback once per loop iteration, right before polling for IO.

Raises:

uv.UVError – error while initializing the handle

Parameters:
  • loop (uv.Loop) – event loop the handle should run on
  • on_prepare (Callable[[uv.Prepare], None]) – callback which should run right before polling for IO after the handle has been started
on_prepare

Callback which should run right before polling for IO after the handle has been started.

on_prepare(prepare_handle)
Parameters:prepare_handle (uv.Prepare) – handle the call originates from
Readonly:False
Type:Callable[[uv.Prepare], None]
start(on_prepare=None)[source]

Start the handle. The callback will run once per loop iteration right before polling for IO from now on.

Raises:
  • uv.UVError – error while starting the handle
  • uv.ClosedHandleError – handle has already been closed or is closing
Parameters:

on_prepare (Callable[[uv.Prepare], None]) – callback which should run right before polling for IO (overrides the current callback if specified)

stop()[source]

Stop the handle. The callback will no longer be called.

Raises:uv.UVError – error while stopping the handle