From 153f26b2873e90c8722c49ce9e8620dd85cea9e7 Mon Sep 17 00:00:00 2001 From: Jonathan Slenders Date: Fri, 13 Jul 2018 14:24:46 +0200 Subject: Added note about the Win32PipeInput design. --- prompt_toolkit/input/win32_pipe.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prompt_toolkit/input/win32_pipe.py b/prompt_toolkit/input/win32_pipe.py index 85c609bf..855d08ae 100644 --- a/prompt_toolkit/input/win32_pipe.py +++ b/prompt_toolkit/input/win32_pipe.py @@ -31,6 +31,9 @@ class Win32PipeInput(Input): def __init__(self): # Event (handle) for registering this input in the event loop. # This event is set when there is data available to read from the pipe. + # Note: We use this approach instead of using a regular pipe, like + # returned from `os.pipe()`, because making such a regular pipe + # non-blocking is tricky and this works really well. self._event = create_win32_event() self._closed = False -- cgit v1.2.3