This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author maggyero
Recipients eryksun, gaborjbernat, maggyero, neologix, paul.moore, pdgoins-work, pitrou, steve.dower, tim.golden, tim.peters, zach.ware
Date 2019-06-21.08:17:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561105067.47.0.151316961007.issue21822@roundup.psfhosted.org>
In-reply-to
Content
I am having the same blocked signal issue on Windows when using Thread.join. This program does not print "interrupted" after pressing Ctrl+C:


import threading
import time


def f():
    while True:
        print("processing")
        time.sleep(1)


if __name__ == "__main__":
    try:
        thread = threading.Thread(target=f)
        thread.start()
        thread.join()
    except KeyboardInterrupt:
        print("interrupted")


For reference, 2 years ago Nathaniel Smith gave an interesting explanation here:
https://mail.python.org/pipermail/python-dev/2017-August/148800.html.
History
Date User Action Args
2019-06-21 08:17:47maggyerosetrecipients: + maggyero, tim.peters, paul.moore, pitrou, tim.golden, neologix, zach.ware, eryksun, steve.dower, pdgoins-work, gaborjbernat
2019-06-21 08:17:47maggyerosetmessageid: <1561105067.47.0.151316961007.issue21822@roundup.psfhosted.org>
2019-06-21 08:17:47maggyerolinkissue21822 messages
2019-06-21 08:17:47maggyerocreate