Idle handles will run the given callback once per loop iteration, right
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.
Despite the name, idle handles will get their callbacks called on every loop iteration, not when the loop is actually “idle”.
Idle handle type.
typedef void (*uv_idle_cb)(uv_idle_t *handle)#
Type definition for callback passed to
uv_handle_t members also apply.
int uv_idle_init(uv_loop_t *loop, uv_idle_t *idle)#
Initialize the handle. This function always succeeds.
int uv_idle_start(uv_idle_t *idle, uv_idle_cb cb)#
Start the handle with the given callback. This function always succeeds, except when cb is NULL.
0 on success, or UV_EINVAL when cb == NULL.
int uv_idle_stop(uv_idle_t *idle)#
Stop the handle, the callback will no longer be called. This function always succeeds.
uv_handle_t API functions also apply.