/libuv/docs/src/ |
H A D | metrics.rst | 7 libuv provides a metrics API to track various internal operations of the event 16 The struct that contains event loop metrics. It is recommended to retrieve 36 Number of event loop iterations. 40 Number of events that have been processed by the event handler. 44 Number of events that were waiting to be processed when the event provider 53 Retrieve the amount of time the event loop has been idle in the kernel's 54 event provider (e.g. ``epoll_wait``). The call is thread safe. 56 The return value is the accumulated time spent idle in the kernel's event 61 The event loop will not begin accumulating the event provider's idle 69 Copy the current set of event loop metrics to the ``metrics`` pointer.
|
H A D | loop.rst | 7 The event loop is the central part of libuv's functionality. It takes care 85 spends in the event provider. 129 you should run the event loop again sometime in the future). 133 you should run the event loop again sometime in the future). 144 Stop the event loop, causing :c:func:`uv_run` to end as soon as 156 Get backend file descriptor. Only kqueue, epoll and event ports are 209 It is necessary to explicitly call this function on every event 232 On Mac OS X, if directory FS event handles were in use in the 233 parent process *for any event loop*, the child process will no 235 implementation. Instead, uses of directory FS event handles in [all …]
|
H A D | design.rst | 8 around the event-driven asynchronous I/O model. 27 libuv provides users with 2 abstractions to work with, in combination with the event loop: 43 The I/O (or event) loop is the central part of libuv. It establishes the content for all I/O 44 operations, and it's meant to be tied to a single thread. One can run multiple event loops 45 as long as each runs in a different thread. The libuv event loop (or any other API involving 48 The event loop follows the rather usual single threaded asynchronous I/O approach: all (network) 50 on the given platform: epoll on Linux, kqueue on OSX and other BSDs, event ports on SunOS and IOCP 55 In order to better understand how the event loop operates, the following diagram illustrates all 107 the following event loop iteration.
|
H A D | poll.rst | 11 rely on the event loop to signal it about the socket status changes, like 50 Poll event types 90 as an event is detected the callback will be called with `status` set to 0, 93 The `UV_PRIORITIZED` event is used to watch for sysfs interrupts or TCP 96 The `UV_DISCONNECT` event is optional in the sense that it may not be 138 .. versionchanged:: 1.9.0 Added the `UV_DISCONNECT` event. 139 .. versionchanged:: 1.14.0 Added the `UV_PRIORITIZED` event.
|
H A D | index.rst | 26 * Full-featured event loop backed by epoll, kqueue, IOCP, event ports.
|
H A D | async.rst | 7 Async handles allow the user to "wakeup" the event loop and get a callback 45 Wake up the event loop and call the async handle's callback.
|
H A D | fs_event.rst | 16 must be spawned for each monitor for the same event. 70 * By default, if the fs event watcher is given a directory name, we will 86 * By default, event watcher, when watching directory, is not registering
|
H A D | timer.rst | 41 If `timeout` is zero, the callback fires on the next event loop iteration. 46 …Does not update the event loop's concept of "now". See :c:func:`uv_update_time` for more informati…
|
H A D | threadpool.rst | 20 The threadpool is global and shared across all event loops. When a particular
|
H A D | fs_poll.rst | 9 changed so they can work on file systems where fs event handles can't.
|
H A D | signal.rst | 7 Signal handles implement Unix style signal handling on a per-event loop bases.
|
/libuv/docs/src/guide/ |
H A D | eventloops.rst | 1 Advanced event loops 4 libuv provides considerable user control over event loops, and you can achieve 6 event loop into another event loop based library -- imagine a Qt based UI, and 7 Qt's event loop driving a libuv backend which does intensive system level 10 Stopping an event loop 13 ``uv_stop()`` can be used to stop an event loop. The earliest the loop will 29 within the event loop, which is why invoking ``uv_stop()`` in them will still
|
H A D | basics.rst | 4 libuv enforces an **asynchronous**, **event-driven** style of programming. Its 5 core job is to provide an event loop and callback based notifications of I/O 12 In event-driven programming, an application expresses interest in certain events 15 libuv, and the user can register callbacks to be invoked when an event occurs. 16 The event-loop usually keeps running *forever*. In pseudocode: 21 e = get the next event 52 operating system to watch the socket and put an event notification in the 59 events can be treated as just another libuv event. The non-blocking ensures 73 libuv's event loop is explained in more detail in the `documentation 94 event loop has to be told to watch out for events using the various API [all …]
|
H A D | threads.rst | 4 Wait a minute? Why are we on threads? Aren't event loops supposed to be **the 19 section within libuv. Whereas other features intimately depend on the event 23 event loop. 28 This chapter makes the following assumption: **There is only one event loop, 30 with the event loop (except using ``uv_async_send``). 195 with the event-loop paradigm. When you use event loops, it is *imperative to 203 getting them to play with an event loop library generally involves rolling your 210 event loop from performing other activities. 235 will be called on the thread the event loop is running in. It will be passed 325 event. [all …]
|
H A D | utilities.rst | 65 The event loop only runs as long as there are active handles. This system 66 works by having every handle increase the reference count of the event loop 102 The callbacks of idle handles are invoked once per event loop. The idle 107 a GUI application. Say you are using an event loop for a file download. If the 109 event loop will pause (**block**), which means your progress bar will freeze 197 into the libuv event loop. All that is required is that the library allow you 202 use these in the event loop thread, use the :ref:`threadpool` instead. Of 213 using the libuv event loop, and use the non-blocking, async multi_ interface to 286 in the interval. Then depending on what event triggered the callback, we set
|
H A D | introduction.rst | 22 services and clients. You have found that the event loop approach is well 41 libev ran only on Unix. The Windows equivalent of kernel event notification
|
H A D | processes.rst | 14 A common refrain against event-based programs is that they cannot take 17 cores, improving performance. But an event loop has only one thread. The 19 running an event loop, and each process getting assigned to a separate CPU 156 in that it will process only one event. UV_RUN_ONCE blocks if there are no 164 useful. A server using multiple event loops could ensure that all data was 293 system used by open source desktop environments uses domain sockets for event
|
/libuv/src/win/ |
H A D | winsock.c | 465 HANDLE event = NULL; in uv__msafd_poll() local 473 event = overlapped->hEvent; in uv__msafd_poll() 476 if ((uintptr_t) event & 1) { in uv__msafd_poll() 477 event = (HANDLE)((uintptr_t) event & ~(uintptr_t) 1); in uv__msafd_poll() 486 event = CreateEvent(NULL, FALSE, FALSE, NULL); in uv__msafd_poll() 487 if (event == NULL) { in uv__msafd_poll() 495 event, in uv__msafd_poll() 509 DWORD r = WaitForSingleObject(event, INFINITE); in uv__msafd_poll() 513 CloseHandle(event); in uv__msafd_poll() 521 CloseHandle(event); in uv__msafd_poll()
|
H A D | poll.c | 55 HANDLE event; in uv__init_overlapped_dummy() local 57 event = CreateEvent(NULL, TRUE, TRUE, NULL); in uv__init_overlapped_dummy() 58 if (event == NULL) in uv__init_overlapped_dummy() 62 overlapped_dummy_.hEvent = (HANDLE) ((uintptr_t) event | 1); in uv__init_overlapped_dummy()
|
/libuv/src/unix/ |
H A D | fsevents.c | 155 uv__fsevents_event_t* event; \ 167 event = uv__queue_data(q, uv__fsevents_event_t, member); \ 189 handle->cb(handle, event->path[0] ? event->path : NULL, event->events, 0); in uv__fsevents_cb() 230 uv__fsevents_event_t* event; in uv__fsevents_event_cb() local 303 event = uv__malloc(sizeof(*event) + len); in uv__fsevents_event_cb() 304 if (event == NULL) in uv__fsevents_event_cb() 307 memset(event, 0, sizeof(*event)); in uv__fsevents_event_cb() 308 memcpy(event->path, path, len + 1); in uv__fsevents_event_cb() 309 event->events = UV_RENAME; in uv__fsevents_event_cb() 314 event->events = UV_CHANGE; in uv__fsevents_event_cb() [all …]
|
H A D | os390-syscalls.c | 110 struct pollfd event; in maybe_resize() local 116 event.fd = -1; in maybe_resize() 119 event = lst->items[lst->size - 1]; in maybe_resize() 132 newlst[newsize - 1] = event; in maybe_resize() 239 struct epoll_event *event) { in epoll_ctl() argument 262 lst->items[fd].events = event->events; in epoll_ctl() 270 lst->items[fd].events = event->events; in epoll_ctl()
|
H A D | os390-syscalls.h | 56 int epoll_ctl(uv__os390_epoll* ep, int op, int fd, struct epoll_event *event);
|
H A D | process.c | 1025 struct kevent event; in uv_spawn() 1026 EV_SET(&event, pid, EVFILT_PROC, EV_ADD | EV_ONESHOT, NOTE_EXIT, 0, 0); in uv_spawn() 1027 if (kevent(loop->backend_fd, &event, 1, NULL, 0, NULL)) { in uv_spawn()
|
/libuv/ |
H A D | LINKS.md | 40 * [scala-native-loop](https://github.com/scala-native/scala-native-loop): Extensible event loop and… 48 …hub.com/MagicStack/uvloop): Ultra fast implementation of python's asyncio event loop on top of lib… 72 …* [uvw](https://github.com/skypjack/uvw) - Header-only, event based, tiny and easy to use *libuv* … 75 * [uvloop](https://github.com/MagicStack/uvloop) - Ultra fast asyncio event loop.
|
H A D | README.md | 12 * Full-featured event loop backed by epoll, kqueue, IOCP, event ports. 342 after the process terminates unless the event loop is closed.
|