bpo-36250: ignore ValueError from signal in non-main thread (GH-12251)

Authored-By: blueyed <github@thequod.de>
3 files changed