initializes a new |uv_prepare_t|. Returns the Lua
userdata wrapping it.
Returns: `uv_prepare_t userdata`
uv.prepare_start({prepare}, {callback}) *uv.prepare_start()*
> method form `prepare:start(callback)`
Parameters:
- `prepare`: `uv_prepare_t userdata`
- `callback`: `callable`
Start the handle with the given callback.
Returns: `0` or `fail`
uv.prepare_stop({prepare}) *uv.prepare_stop()*
> method form `prepare:stop()`
Parameters:
- `prepare`: `uv_prepare_t userdata`
Stop the handle, the callback will no longer be called.
Returns: `0` or `fail`
==============================================================================
`uv_check_t` — Check handle *luv-check-handle* *uv_check_t*
> |uv_handle_t| functions also apply.
Check handles will run the given callback once per loop iteration, right after
polling for I/O.
>lua
local check = uv.new_check()
check:start(function()
print("After I/O polling")
end)
<
uv.new_check() *uv.new_check()*
Creates and initializes a new |uv_check_t|. Returns the Lua
userdata wrapping it.
Returns: `uv_check_t userdata`
uv.check_start({check}, {callback}) *uv.check_start()*
> method form `check:start(callback)`
Parameters:
- `check`: `uv_check_t userdata`
- `callback`: `callable`
Start the handle with the given callback.
Returns: `0` or `fail`
uv.check_stop({check}) *uv.check_stop()*
> method form `check:stop()`
Parameters:
- `check`: `uv_check_t userdata`
Stop the handle, the callback will no longer be called.
Returns: `0` or `fail`
==============================================================================
`uv_idle_t` — Idle handle *luv-idle-handle* *uv_idle_t*
> |uv_handle_t| functions also apply.
Idle handles will run the given callback once per loop iteration, right before
the |uv_prepare_t| handles.
Note: 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 I/O.
WARNING: Despite the name, idle handles will get their callbacks called on
every loop iteration, not when the loop is actually "idle".
>lua
local idle = uv.new_idle()
idle:start(function()
print("Before I/O polling, no blocking")
end)
<
uv.new_idle() *uv.new_idle()*
Creates and initializes a new |uv_idle_t|. Returns the Lua
userdata wrapping it.
Returns: `uv_idle_t userdata`
uv.idle_start({idle}, {callback}) *uv.idle_start()*
> method form `idle:start(callback)`
Parameters:
- `idle`: `uv_idle_t userdata`
- `callback`: `callable`
Start the handle with the given callback.
Returns: `0` or `fail`
uv.idle_stop({check}) *uv.idle_stop()*
> method form `idle:stop()`
Parameters:
- `idle`: `uv_idle_t userdata`
Stop the handle, the callback will no longer be called.
Returns: `0` or `fail`
==============================================================================
`uv_async_t` — Async handle *luv-async-handle* *uv_async_t*
> |uv_handle_t| functions