Sha256: 3bddfe01ef5a808d3a54f908b0f3505ab33c21d380f36fbe1fd779ebd8de7c66

Contents?: true

Size: 1.18 KB

Versions: 37

Compression:

Stored size: 1.18 KB

Contents

.. _idle:

:c:type:`uv_idle_t` --- Idle handle
===================================

Idle handles will run the given callback once per loop iteration, right
before the :c:type:`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".


Data types
----------

.. c:type:: uv_idle_t

    Idle handle type.

.. c:type:: void (*uv_idle_cb)(uv_idle_t* handle)

    Type definition for callback passed to :c:func:`uv_idle_start`.


Public members
^^^^^^^^^^^^^^

N/A

.. seealso:: The :c:type:`uv_handle_t` members also apply.


API
---

.. c:function:: int uv_idle_init(uv_loop_t* loop, uv_idle_t* idle)

    Initialize the handle.

.. c:function:: int uv_idle_start(uv_idle_t* idle, uv_idle_cb cb)

    Start the handle with the given callback.

.. c:function:: int uv_idle_stop(uv_idle_t* idle)

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

.. seealso:: The :c:type:`uv_handle_t` API functions also apply.

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
mt-libuv-4.1.04 ext/libuv/docs/src/idle.rst
mt-libuv-4.1.03 ext/libuv/docs/src/idle.rst
mt-libuv-4.1.02 ext/libuv/docs/src/idle.rst
libuv-4.0.9 ext/libuv/docs/src/idle.rst
libuv-4.0.2 ext/libuv/docs/src/idle.rst
libuv-4.0.1 ext/libuv/docs/src/idle.rst
libuv-2.0.12 ext/libuv/docs/src/idle.rst
libuv-2.0.11 ext/libuv/docs/src/idle.rst
libuv-4.0.0 ext/libuv/docs/src/idle.rst
libuv-3.3.0 ext/libuv/docs/src/idle.rst
libuv-3.2.4 ext/libuv/docs/src/idle.rst
libuv-3.2.3 ext/libuv/docs/src/idle.rst
libuv-3.2.2 ext/libuv/docs/src/idle.rst
libuv-3.2.1 ext/libuv/docs/src/idle.rst
libuv-3.2.0 ext/libuv/docs/src/idle.rst
libuv-3.1.9 ext/libuv/docs/src/idle.rst
libuv-3.1.8 ext/libuv/docs/src/idle.rst
libuv-3.1.7 ext/libuv/docs/src/idle.rst
libuv-3.1.6 ext/libuv/docs/src/idle.rst
libuv-3.1.5 ext/libuv/docs/src/idle.rst