Prepare handles will run the given callback once per loop iteration, right before polling for i/o.
Prepare handle <libuv 1.10.3-dev API documentation>
See also The Handle API functions also apply.
Types
Prepare = object loop* {.
importc: "loop".}: ptr Loop ## Pointer to the ``Loop`` where the handle is running on. Readonly. typ* {.importc: "type".}: HandleType ## The ``HandleType``. Readonly. data* {.importc: "data".}: pointer ## Space for user-defined arbitrary data. libuv does not use this field.- Prepare handle type. Source Edit
PrepareCb = proc (handle: ptr Prepare) {.
cdecl.}- Type definition for callback passed to start(). Source Edit
Procs
proc init(loop: ptr Loop; handle: ptr Prepare): cint {.
importc: "uv_prepare_init", header: "uv.h".}- Initialize the handle. Source Edit
proc start(handle: ptr Prepare; cb: PrepareCb): cint {.
importc: "uv_prepare_start", header: "uv.h".}- Start the handle with the given callback. Source Edit
proc stop(handle: ptr Prepare): cint {.
importc: "uv_prepare_stop", header: "uv.h".}- Stop the handle, the callback will no longer be called. Source Edit