libuv/docs/src
Bartosz Sosnowski 7d950c0d10 win, tty: improve SIGWINCH performance
Continuing improvement of SIGWINCH from PR #2308.

Running SetWinEventHook without filtering for the specific PIDs has
significant impact on the performance of the entire system. This PR
changes the way SIGWINCH is handled.

The SetWinEventHook callback now signals a separate thread,
uv__tty_console_resize_watcher_thread. This thread calls
uv__tty_console_signal_resize() which checks if the console was actually
resized. The uv__tty_console_resize_watcher_thread makes sure to not to
call the uv__tty_console_signal_resize function more than 30 times per
second.

The SetWinEventHook will not be installed, if the PID of the
conhost.exe process that owns the console window cannot be
determinated. This can happen when a 32bit libuv app is running on a
64bit Windows.

For such cases PR #1408 is partially reverted - when tty reads
WINDOW_BUFFER_SIZE_EVENT, it will also trigger a call to
uv__tty_console_signal_resize(). This will also help when the app is
running under console emulators. Documentation was also updated to
reflect that.

Refs: https://github.com/microsoft/terminal/issues/1811
Refs: https://github.com/microsoft/terminal/issues/410
Refs: https://github.com/libuv/libuv/pull/2308

PR-URL: https://github.com/libuv/libuv/pull/2381
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-09-05 11:36:02 +02:00
..
guide doc: fix typo in basics.rst 2019-08-06 10:59:05 -04:00
sphinx-plugins doc: fix build with sphinx 2.x 2019-05-13 16:06:29 -04:00
static doc: add API documentation 2014-09-11 09:38:35 +02:00
api.rst doc: move TOC to a dedicated document 2017-04-28 11:14:50 +02:00
async.rst doc: mark uv_async_send() as async-signal-safe 2019-04-23 10:46:56 +02:00
check.rst doc: add missing variable name 2015-07-10 09:22:00 +02:00
conf.py core: move all include files except uv.h to uv/ 2018-06-14 18:39:32 +02:00
design.rst doc: add link to nodejs.org 2019-06-24 21:32:13 -04:00
dll.rst doc: add uv_dlsym() return type 2015-09-02 09:58:55 +02:00
dns.rst doc: document uv_getnameinfo_t.{host|service} 2015-03-02 16:53:57 +01:00
errors.rst src: add new error apis to prevent memory leaks 2018-07-06 19:35:21 +02:00
fs_event.rst zos: implement uv_fs_event* functions 2017-12-15 11:04:16 +01:00
fs_poll.rst docs: improve UV_ENOBUFS scenario documentation 2017-03-08 20:55:40 -05:00
fs.rst win: remove try-except outside MSVC 2019-08-09 09:53:55 -04:00
guide.rst doc: add warning note to user guide 2017-04-28 11:15:53 +02:00
handle.rst doc: clarify uv_buf_t usage in uv_alloc_cb 2019-08-23 20:27:48 +02:00
idle.rst doc: add missing variable name 2015-07-10 09:22:00 +02:00
index.rst doc: add initial version of the User Guide 2017-04-28 11:15:10 +02:00
loop.rst doc: add note about uv_run() not being reentrant 2019-03-08 08:40:06 +01:00
migration_010_100.rst doc: fix spelling 2014-11-29 04:22:56 +01:00
misc.rst unix,win: add ability to retrieve all env variables 2019-08-03 08:33:42 +02:00
pipe.rst doc: document uv_pipe_t::ipc 2018-06-19 22:53:10 -04:00
poll.rst poll: add support for OOB TCP and GPIO interrupts 2017-07-12 23:04:34 +02:00
prepare.rst doc: add API documentation 2014-09-11 09:38:35 +02:00
process.rst win: support more fine-grained windows hiding 2018-11-10 14:43:23 -05:00
request.rst doc: document UV_*_MAP() macros 2018-06-19 22:58:50 -04:00
signal.rst win, tty: improve SIGWINCH performance 2019-09-05 11:36:02 +02:00
stream.rst doc: clarify uv_buf_t usage in uv_alloc_cb 2019-08-23 20:27:48 +02:00
tcp.rst tcp: add uv_tcp_close_reset method 2019-08-19 23:41:15 +02:00
threading.rst doc: fix typo in uv_thread_options_t definition 2019-03-16 11:37:00 -04:00
threadpool.rst doc: fix incorrect versionchanged 2019-06-27 13:20:14 -04:00
timer.rst doc: document uv_timer_start() on an active timer 2018-02-21 09:07:05 -05:00
tty.rst stream: autodetect direction 2018-09-19 18:19:28 +02:00
udp.rst udp: add source-specific multicast support 2019-08-23 21:09:47 +02:00
upgrading.rst doc: move "upgrading" to a standalone document 2017-04-28 11:15:04 +02:00
version.rst doc: add section with version-checking macros and functions 2015-06-29 23:09:14 +02:00