summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Slenders <jonathan@slenders.be>2018-07-13 14:24:46 +0200
committerJonathan Slenders <jonathan@slenders.be>2018-07-13 14:24:58 +0200
commit153f26b2873e90c8722c49ce9e8620dd85cea9e7 (patch)
treea7d19031b9c8a0ce9c0ad5344b7e981ab0830bad
parent0cd4719a3c397e2b87a33c09bee7e02d457487b6 (diff)
Added note about the Win32PipeInput design.
-rw-r--r--prompt_toolkit/input/win32_pipe.py3
1 files changed, 3 insertions, 0 deletions
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