Skip to content

Commit 8446e02

Browse files
ptoscominrk
andauthored
Fix KeyboardInterrupt on Windows by manually resetting interrupt event (#1434)
Co-authored-by: Min RK <benjaminrk@gmail.com>
1 parent dd1e094 commit 8446e02

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ipykernel/parentpoller.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ def run(self):
121121

122122
if WAIT_OBJECT_0 <= result < len(handles):
123123
handle = handles[result - WAIT_OBJECT_0]
124+
ctypes.windll.kernel32.ResetEvent(handle) # type:ignore[attr-defined]
124125

125126
if handle == self.interrupt_handle:
126127
# check if signal handler is callable

0 commit comments

Comments
 (0)