Overview
| Artifact ID: | 32dd5a669923a53cb63033eab54ff48be8ebe0282d1f485dc0042fbc3d251869 |
|---|---|
| Ticket: | 1d0618000674abdf701021d69eaa858cbccf14a4
channel reads prematurely from stdin on Windows |
| User & Date: | mdehoon on 2025-11-09 02:07:35 |
Changes
- icomment:
The ConsoleReaderThread function in tcl/win/tclWinConsole.c is very old code dating back at least to 1999. This was before Windows XP came out, which introduced the MsgWaitForMultipleObjects and MsgWaitForMultipleObjectsEx functions in the Microsoft win32 API. Perhaps in 1999 it was necessary to create a thread to monitor stdin activity while also handling GUI events. I haven't tried it yet, but the documentation of MsgWaitForMultipleObjects/Ex suggests it can wait for a GUI event message or a console input event at the same time. If so, running a separate thread for console input may no longer be necessary.
- login: "mdehoon"
- mimetype: "text/plain"
- username: "mdehoon"