[Python-Dev] Interrupt thread.join() with Ctrl-C (original) (raw)
[Python-Dev] Interrupt thread.join() with Ctrl-C / KeyboardInterrupt on Windows
Jonathan Slenders jonathan at slenders.be
Tue Aug 8 05:54:28 EDT 2017
- Previous message (by thread): [Python-Dev] PyThreadState_GET() returns NULL from within PyImport_GetModuleDict()
- Next message (by thread): [Python-Dev] Interrupt thread.join() with Ctrl-C / KeyboardInterrupt on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all,
Is it possible that thread.join() cannot be interrupted on Windows, while it can be on Linux? Would this be a bug, or is it by design?
import threading, time def wait(): time.sleep(1000) t = threading.Thread(target=wait) t.start() t.join() # Press Control-C now. It stops on Linux, while it hangs on Windows.
Tested on Python 3.6.
Thanks, Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20170808/46a6c093/attachment.html>
- Previous message (by thread): [Python-Dev] PyThreadState_GET() returns NULL from within PyImport_GetModuleDict()
- Next message (by thread): [Python-Dev] Interrupt thread.join() with Ctrl-C / KeyboardInterrupt on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]