Cool writeup but... Signals are not some opaque or roundabout feature to do this. Signals are a thing for a reason and this is how it's implemented in any threaded I/O library I've read.
Disclaimer: I haven’t looked at Zig’s implementation; I’m only going off how the Unix APIs work.