Though it is definitely a killer feature of Go to write in a blocking style rather than in a state machine style... but I feel that there might have been a way to do it without baking it so hard into the runtime (?). Maybe like coroutines in Python, which run on a single thread and are optional.
M:N threading causes a lot of other complications too, like calling from C to Go, etc.
In either case, the signal handler doesn't get run for an arbitrary period of time. And another signal could occur.
I didn't trace through the code to see how this is handled... but it seems like it is hard to handle simply and correctly (you're kind of recapitulating the problems of signals to begin with, in a higher level language).
Any docs / clarity on this would be interesting to me, as I will probably implement this in my own language soon.
It queues your Python signal handling function, returns from the signal handler, and then runs it on the main loop at the next tick.
As far as I know this works fine. I wrote the same program in Python and it seems to work just fine, and have more functionality than the Go version. I guess one problem is that if you do a long blocking syscall on a tick in the main loop, your signal handler can be delayed indefinitely. There might be some hacks around this in the Python interpreter, but I don't recall offhand.