Lines Matching refs:a
12 Timers invoke the callback after a certain time has elapsed since the timer was
16 Simple use is to init a watcher and start it with a ``timeout``, and optional ``repeat``.
26 will start a repeating timer, which first starts 5 seconds (the ``timeout``) after the execution
40 a timer callback, it means:
73 These functions can be used to allow a loop to exit even when a watcher is
76 The latter can be used with interval timers. You might have a garbage collector
77 which runs every X seconds, or your network service might send a heartbeat to
104 you could dispatch a summary of the daily application performance to the
107 a GUI application. Say you are using an event loop for a file download. If the
110 and the user will face an unresponsive application. In such a case queue up and
123 for a brief amount as the loop deals with the input data, after which it will
138 to the worker thread. The solution is to use a ``struct`` and set
140 ``uv_work_t`` itself as the first member of this struct (called a baton [#]_).
200 will not allow such access, providing only a standard blocking function which
208 the OS notices a change of state in file descriptors being polled, libuv will
211 Here we will walk through a simple download manager that will use libcurl_ to
228 is invoked whenever the state of a socket changes and we have to start polling
238 So we add each argument as a URL
247 We let libcurl directly write the data to a file, but much more is possible if
251 things are set in motion. This simply starts a libuv `timer <#timers>`_ which
265 we create a ``uv_poll_t`` handle if it doesn't exist, and associate it with the
311 libuv provides a cross platform API to dynamically load `shared libraries`_.
316 program will behave unpredictably. This example implements a very simple
335 which will be called by the application. This plugin is compiled as a shared
358 ``uv_dlopen`` expects a path to the shared library and sets the opaque
362 ``uv_dlsym`` stores a pointer to the symbol in the second argument in the third
363 argument. ``init_plugin_function`` is a function pointer to the sort of
371 Text terminals have supported basic formatting for a long time, with a `pretty
374 libuv provides the ``uv_tty_t`` abstraction (a stream) and related functions to
381 The first thing to do is to initialize a ``uv_tty_t`` with the file descriptor
398 a file, control sequences should not be written as they impede readability and
399 ``grep``. To check if the file descriptor is indeed a TTY, call
403 Here is a simple example which prints white text on a red background:
412 width and height of the terminal and returns ``0`` on success. Here is a small