Home
last modified time | relevance | path

Searched refs:event (Results 1 – 25 of 36) sorted by relevance

12

/libuv/docs/src/
H A Dmetrics.rst7 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 Dloop.rst7 The event loop is the central part of libuv's functionality. It takes care
72 spends in the event provider.
111 you should run the event loop again sometime in the future).
115 you should run the event loop again sometime in the future).
126 Stop the event loop, causing :c:func:`uv_run` to end as soon as
138 Get backend file descriptor. Only kqueue, epoll and event ports are
191 It is necessary to explicitly call this function on every event
214 On Mac OS X, if directory FS event handles were in use in the
215 parent process *for any event loop*, the child process will no
217 implementation. Instead, uses of directory FS event handles in
[all …]
H A Ddesign.rst8 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 Dpoll.rst11 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 Dindex.rst26 * Full-featured event loop backed by epoll, kqueue, IOCP, event ports.
H A Dasync.rst7 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 Dfs_event.rst16 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 Dtimer.rst41 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 Dthreadpool.rst20 The threadpool is global and shared across all event loops. When a particular
H A Dfs_poll.rst9 changed so they can work on file systems where fs event handles can't.
/libuv/docs/src/guide/
H A Deventloops.rst1 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 Dbasics.rst4 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 Dthreads.rst4 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 Dutilities.rst65 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 Dintroduction.rst22 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 Dprocesses.rst14 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 Dwinsock.c465 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 Dpoll.c55 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 Dfsevents.c155 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
307 event = uv__malloc(sizeof(*event) + len); in uv__fsevents_event_cb()
308 if (event == NULL) in uv__fsevents_event_cb()
311 memset(event, 0, sizeof(*event)); in uv__fsevents_event_cb()
312 memcpy(event->path, path, len + 1); in uv__fsevents_event_cb()
313 event->events = UV_RENAME; in uv__fsevents_event_cb()
318 event->events = UV_CHANGE; in uv__fsevents_event_cb()
[all …]
H A Dos390-syscalls.c110 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 Dos390-syscalls.h56 int epoll_ctl(uv__os390_epoll* ep, int op, int fd, struct epoll_event *event);
H A Dprocess.c1024 struct kevent event; in uv_spawn()
1025 EV_SET(&event, pid, EVFILT_PROC, EV_ADD | EV_ONESHOT, NOTE_EXIT, 0, 0); in uv_spawn()
1026 if (kevent(loop->backend_fd, &event, 1, NULL, 0, NULL)) { in uv_spawn()
/libuv/test/
H A Dtest-fs-event.c1102 uv_fs_event_t* event; in TEST_IMPL() local
1116 event = &events[i]; in TEST_IMPL()
1120 ASSERT_OK(uv_fs_event_init(loop, event)); in TEST_IMPL()
1121 ASSERT_OK(uv_fs_event_start(event, in TEST_IMPL()
1125 uv_unref((uv_handle_t*) event); in TEST_IMPL()
1143 event = &events[i]; in TEST_IMPL()
1145 ASSERT_OK(uv_fs_event_stop(event)); in TEST_IMPL()
1146 uv_ref((uv_handle_t*) event); in TEST_IMPL()
1147 uv_close((uv_handle_t*) event, fs_event_error_report_close_cb); in TEST_IMPL()
/libuv/
H A DLINKS.md47 …hub.com/MagicStack/uvloop): Ultra fast implementation of python's asyncio event loop on top of lib…
71 …* [uvw](https://github.com/skypjack/uvw) - Header-only, event based, tiny and easy to use *libuv* …
74 * [uvloop](https://github.com/MagicStack/uvloop) - Ultra fast asyncio event loop.
H A DREADME.md12 * Full-featured event loop backed by epoll, kqueue, IOCP, event ports.
330 after the process terminates unless the event loop is closed.

Completed in 74 milliseconds

12