aboutsummaryrefslogtreecommitdiff
path: root/docs/src
Commit message (Collapse)AuthorAge
* tcp: support customizing TCP_KEEPINTVL and TCP_KEEPCNTAndy Pan2025-05-21
| | | | | Implement `uv_tcp_keepalive_ex` function that extends `uv_tcp_keepalive` to support `TCP_KEEPINTVL` and `TCP_KEEPCN` socket options in addition to TCP_KEEPIDLE.
* doc: update ncurses link (#4788)Saúl Ibarra Corretgé2025-05-16
| | | The link at gnu.org is a redirect now and the docs linter breaks some times.
* doc: don't mention UV_LOOP_ENABLE_IO_URING_SQPOLL (#4786)Poul T Lomholt2025-05-15
| | | | | The documentation is referring to an internal name - UV_LOOP_ENABLE_IO_URING_SQPOLL - in several places. Fix this by using the public UV_LOOP_USE_IO_URING_SQPOLL name instead.
* doc: update thread pool stack size comment (#4756)Ben Noordhuis2025-04-17
| | | | | | | | | | I changed the default stack size in commit 73b0c1f94 from October 2022 and although I added a versionchanged note, I didn't update the blurb a few lines below. It wasn't accurate before that change either though, because even with musl libc's ~80kb thread stacks, 128 threads works out to 10 MB. Refs: https://github.com/nodejs/node/issues/57911
* doc: fix rendering of threading.html (#4716)Tobias Nießen2025-02-25
|
* win: add ENABLE_VIRTUAL_TERMINAL_INPUT raw tty mode (#4688)Anna Henningsen2025-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows provides the `ENABLE_VIRTUAL_TERMINAL_INPUT` flag for TTY input streams as a companion flag to `ENABLE_VIRTUAL_TERMINAL_PROCESSING`, which libuv is already setting for TTY output streams. Setting this flag lets the terminal emulator perform some of the processing that libuv already currently does for input events, but most notably enables receiving control sequences that are otherwise entirely unavailable, e.g. for bracketed paste (which the Node.js readline implementation added basic support for in https://github.com/nodejs/node/commit/87af913b66eab78088acfd). libuv currently already provides translations for key events to control sequences, i.e. what this mode is intended to provide, but libuv does not and cannot translate all such events. Since the control sequences differ from the ones that Windows has chosen to standardize on, and applications may not be expecting this change, this is opt-in for now (but ideally will be the default behavior starting in libuv v2.x, should that ever happen). Another downside of this change is that not all shells reset this mode when an application exits. For example, when running a Node.js program with this flag enabled inside of PowerShell in Windows terminal, if the application exits while in raw TTY input mode, neither the shell nor the terminal emulator reset this flag, rendering the input stream unusable. While there's general awareness of the problem that console state is global state rather than per-process (same as on UNIX platforms), it seems that applications like PowerShell aren't expecting to need to unset this flag on the input stream, only its output counterpart (e.g. https://github.com/PowerShell/PowerShell/blob/4e7942135f998ab40fd3ae298b020e161a76d4ef/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs#L1156). Hence, `uv_tty_reset_mode()` is extended to reset the terminal to its original state if the new mode is being used. Refs: https://github.com/nodejs/node/commit/87af913b66eab78088acfd7f3b57d35e22c5f1ba Refs: https://github.com/microsoft/terminal/issues/4954
* unix,win: accept NAN/INFINITY as file timestamps (#4702)Ben Noordhuis2025-02-21
| | | | | | | | | | | | Extend uv_fs_utime, uv_fs_futime and uv_fs_lutime to accept NAN and INFINITY, with NAN meaning "don't touch the timestamp" and INFINITY meaning "set to the current timestamp." Ugly, but it avoids having to add uv_fs_utime2, etc. UV_FS_UTIME_NOW and UV_FS_UTIME_OMIT constants have been added to make it more palatable. Fixes: https://github.com/libuv/libuv/issues/4665
* doc: fix README link text (#4693)Julio Jordán2025-02-08
|
* win: lazy-load [GS]etThreadDescription symbols (#4679)Ben Noordhuis2025-01-24
| | | | | | | Said symbols are not by default available on Windows Server 2016 but libuv can still use them when api-ms-win-core-processthreads-l1-1-3.dll is present. Fixes: https://github.com/libuv/libuv/issues/4677
* misc: implement uv_getrusage_thread (#4666)Juan José2025-01-14
| | | | | | Refs: https://github.com/libuv/libuv/issues/3119 Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com>
* src: set a default thread name for workers (#4664)Rafael Gonzaga2025-01-08
|
* unix,win: add uv_udp_try_send2Ben Noordhuis2024-12-13
| | | | | | | | | Add a version of uv_udp_try_send that can send multiple datagrams. Uses sendmmsg(2) on platforms that support it (Linux, FreeBSD, macOS), falls back to a regular sendmsg(2) loop elsewhere. This work was sponsored by ISC, the Internet Systems Consortium.
* test: address FreeBSD kernel bug causing NULL path in fsevents (#4649)Juan José2024-12-13
| | | | | | | | | | | This commit documents a FreeBSD kernel issue where uv_fs_event can receive a NULL filename and updates test-fs-event.c to skip filename assertions on FreeBSD. * Bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197695 Refs: https://github.com/libuv/libuv/issues/4606 Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
* doc: clarify repeating timer behavior more (#4640)Ben Noordhuis2024-12-08
| | | | | | | It was already documented but only in the uv_timer_set_repeat section. Move it to the toplevel and flesh it out more. Refs: https://github.com/libuv/libuv/issues/181 Refs: https://github.com/libuv/libuv/discussions/4639
* src: add uv_thread_set/getname() methods (#4599)Santiago Gimeno2024-11-27
| | | | | | | | | | | | | `uv_thread_setname()` sets the name of the current thread. Different platforms define different limits on the max number of characters a thread name can be: Linux, IBMi (16), macOS (64), Windows (32767), and NetBSD (32), etc. `uv_thread_setname()` will truncate it in case `name` is larger than the limit of the platform. `uv_thread_getname()` gets the name of the thread specified by `tid`. The thread name is copied into the buffer pointed to by `name`. The `size` parameter specifies the size of the buffer pointed to by `name`. The buffer should be large enough to hold the name of the thread plus the trailing NUL, or it will be truncated to fit.
* unix,win: add support for detached threads (#4621)Juan José2024-11-26
| | | | | | This commit introduces the `uv_thread_detach` for thread detaching, allowing threads to be detached state on both UNIX and Windows platforms. Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
* doc: document specific macOS fs_event behavior (#4503)Santiago Gimeno2024-08-17
|
* doc: properly label enumerations and types (#4506)握猫猫2024-08-16
|
* doc: fix the `uv_*_set_data` series of functions握猫猫2024-08-16
| | | They have no return value.
* doc: document uv_loop_option握猫猫2024-08-15
|
* linux: disable SQPOLL io_uring by default (#4492)Santiago Gimeno2024-08-06
| | | | | | | The SQPOLL io_uring instance wasn't providing consistent behaviour to users depending on kernel versions, load shape, ... creating issues difficult to track and fix. Don't use this ring by default but allow enabling it by calling `uv_loop_configure()` with `UV_LOOP_ENABLE_IO_URING_SQPOLL`.
* doc: correct names of Win32 APIs in fs.rst (#4408)zeertzjq2024-07-25
| | | | The docs there link to GetFinalPathNameByHandleA() and CreateFileA(), but src/win/fs.c uses GetFinalPathNameByHandleW() and CreateFileW().
* unix: support SO_REUSEPORT with load balancing for UDP (#4419)Andy Pan2024-06-20
| | | Signed-off-by: Andy Pan <i@andypan.me>
* doc: add entries for extended getpwJuan José Arboleda2024-05-28
| | | | | | | | | This patch adds documentation for the introduced `uv_os_get_passwd2`, `uv_os_get_group`, `uv_os_free_group` methods in https://github.com/libuv/libuv/pull/3523 Fixes: https://github.com/libuv/libuv/issues/4007 Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
* unix: support SO_REUSEPORT with load balancing for TCPAndy Pan2024-05-21
|
* doc: fix some typosjosedelinux2024-04-26
|
* doc: correct udp socket options documentation (#4371)Ben Noordhuis2024-03-25
| | | | | | | uv_udp_init() creates the UDP socket lazily but to set socket options there must be, well, a socket to set the options on. Document how and when that requirement is met. Fixes: https://github.com/libuv/libuv/issues/4370
* unix,win: error on zero delay tcp keepaliveSaúl Ibarra Corretgé2024-03-22
| | | | Closes: https://github.com/libuv/libuv/pull/4350 Closes: https://github.com/libuv/libuv/issues/3487
* win/spawn: optionally run executable paths with no file extension (#4292)Brad King2024-02-05
| | | | | | | Add a process options flag to enable the optional behavior. Most users are likely recommended to set this flag by default, but it was deemed potentially breaking to set it by default in libuv. Co-authored-by: Kyle Edwards <kyle.edwards@kitware.com>
* unix,win: utility for setting priority for thread (#4075)Hao Hu2023-11-14
| | | | | | | | | Add uv_thread_setpriority for setting priority for threads created by uv_thread_create. Add uv_thread_getpriority for getting thread priority. For Linux by default, if the scheduling policy is SCHED_OTHER and the priority is 0, we need to set the nice value. Fixes: https://github.com/libuv/libuv/issues/4051
* misc: export WTF8 conversion utilities (#4021)Jameson Nash2023-10-28
| | | | | | | | | As promised in #2970, this attempts to migrate code to a common set of utilities in a common place in the code and use them everywhere. This also exports the functionality, since the Windows API with WideCharToMultiByte is fairly verbose relative to what libuv and libuv's clients typically need, so it is useful not to require clients to reimplement this conversion logic unnecessarily (and because Windows is not 64-bit ready here, but this implementation is.)
* doc: filename arg to uv_fs_event_cb can be NULL (#4177)Ben Noordhuis2023-10-22
| | | Refs: https://github.com/libuv/libuv/issues/4160
* doc: uv_close should be called after exit callback (#4164)Pleuvens2023-10-14
| | | Fixes: https://github.com/libuv/libuv/issues/1911
* doc: fix broken "Shared library" Wikipedia link (#4128)Alois Klink2023-08-28
| | | | | | | `linkcheck` is printing the following error: ``` ( guide/utilities: line 311) broken https://en.wikipedia.org/wiki/Shared_library#Shared_libraries - Anchor 'Shared_libraries' not found ```
* doc: switch to Furo, a more modern Sphinx theme (#4094)Saúl Ibarra Corretgé2023-08-14
|
* include: add EUNATCH errno mapping (#4047)Abdirahim Musse2023-06-16
| | | add EUNATCH errno mapping
* unix,win: add UV_PIPE_NO_TRUNCATE flag (#4040)Ben Noordhuis2023-06-06
| | | | | | Libuv's default behavior is to truncate long Unix socket paths. The flag tells it to return an error instead. Fixes: https://github.com/libuv/libuv/issues/4036
* linux: support abstract unix sockets (#4030)Ben Noordhuis2023-06-04
| | | | | Add two new APIs for binding and connecting to abstract UNIX sockets. Fixes: https://github.com/libuv/libuv/issues/4028
* unix: constrained_memory should return UINT64_MAX (#3753)Tim Besard2023-05-12
| | | | | | | | | | | Document that we return UINT64_MAX if the cgroup limit is set to the max. For cgroupv2, that happens if we encounter `max`, while cgroupv1 returns 9223372036854771712 when no limit is set (which according to [this StackExchange discussion] is derived from LONG_MAX and PAGE_SIZE). So make sure we also detect this case for cgroupv1. [this StackExchange discussion]: https://unix.stackexchange.com/questions/420906/what-is-the-value-for-the-cgroups-limit-in-bytes-if-the-memory-is-not-restricte Addresses: https://github.com/libuv/libuv/pull/3744/files#r974062912
* docs: fix some typos (#3984)cui fliter2023-05-12
|
* unix,win: add uv_clock_gettime() (#3971)Ben Noordhuis2023-04-27
| | | Fixes: https://github.com/libuv/libuv/issues/1674
* linux: introduce io_uring support (#3952)Ben Noordhuis2023-04-18
| | | | | | | | | | | | | | | | Add io_uring support for several asynchronous file operations: - read, write - fsync, fdatasync - stat, fstat, lstat io_uring is used when the kernel is new enough, otherwise libuv simply falls back to the thread pool. Performance looks great; an 8x increase in throughput has been observed. This work was sponsored by ISC, the Internet Systems Consortium. Fixes: https://github.com/libuv/libuv/issues/1947
* doc: consistent single backquote in misc.rst (#3946)Jason Zhang2023-04-11
| | | Fixes: https://github.com/libuv/libuv/issues/3928
* win,unix: change execution order of timers (#3927)Trevor Norris2023-03-20
| | | | | | | | | | | | | | | | | | | | | | | | The maximum number of times timers should run when uv_run() is called with UV_RUN_ONCE and UV_RUN_NOWAIT is 1. Do that by conditionally calling timers before entering the while loop when called with UV_RUN_DEFAULT. The reason to always run timers at the end of the while loop, instead of at the beginning, is to help enforce the conceptual event loop model. Which starts when entering the event provider (e.g. calling poll). Other than only allowing timers to be processed once per uv_run() execution, the only other noticeable change this will show is if all the following are true: * uv_run() is called with UV_RUN_NOWAIT or UV_RUN_ONCE. * An event is waiting to be received when poll is called. * Execution time between the call to uv_timer_start() and entering the while loop is longer than the timeout. If all these are true, then timers that would have executed before entering the event provider will now be executed afterward. Fixes: https://github.com/libuv/libuv/issues/3686 Co-authored-by: Momtchil Momtchev <momtchil@momtchev.com>
* doc: document uv_fs_cb type (#3517)Tamás Bálint Misius2023-01-19
|
* unix,win: add uv_get_available_memory() (#3754)Tim Besard2022-11-24
|
* thread: add uv_thread_getcpu() (#3803)daomingq2022-11-15
| | | | Add uv_thread_getcpu() api to get the cpu number on which the calling thread is running.
* src: add new metrics APIs (#3749)Trevor Norris2022-11-11
| | | | | | | | | | | | | The following metrics are now always recorded and available via the new uv_metrics_info() API. * loop_count: Number of event loop iterations. * events: Total number of events processed by the event handler. * events_waiting: Total number of events waiting in the event queue when the event provider request was made. Benchmarking has shown no noticeable impact recording these metrics. PR-URL: https://github.com/libuv/libuv/pull/3749
* doc: document 0 return value for free/total memory (#3817)Ben Noordhuis2022-11-08
| | | Refs: https://github.com/libuv/libuv/discussions/3809
* doc: mention close_cb can be NULL (#3810)Qix2022-11-08
|