Comes from cpython source code:
- only the main thread can set a signal handler
- any thread can get a signal handler
- signals are only delivered to the main thread
This explains what it is doing, but not why it is doing so.
So why only the main thread can set a signal handler and handle signals? Does this come with benefits or due to restrictions?