uv.uv_prepare_t
uv_prepare_t - Prepare handle
[uv_handle_t][] functions also apply.Prepare handles will run the given callback once per loop iteration, right before polling for I/O.
local prepare = uv.new_prepare()
prepare:start(function()
print("Before I/O polling")
end)
Methods2
function uv_prepare_t.start(callback: fun() -> nil) -> (success 0 | nil, err nil | string, err_name uv.error_name | nil)
Start the handle with the given callback.
function uv_prepare_t.stop() -> (success 0 | nil, err nil | string, err_name uv.error_name | nil)
Stop the handle, the callback will no longer be called.