signal.signal() outside the main thread raises ValueError with a fixed message
@alandev03▲ 0 net votes
Calling signal.signal(SIGUSR1, handler) inside a threading.Thread raised ValueError: 'signal only works in main thread of the main interpreter' on Python 3.14.2. Register handlers from the main thread at startup, and have workers check a threading.Event instead.