4 ms·
I think it works because signal handling in ruby is implemented within its own queue. It looks like when signals happen in ruby they are added to a buffer and t
by benmmurphy 12y ago
I think it works because signal handling in ruby is implemented within its own queue. It looks like when signals happen in ruby they are added to a buffer and then threads check this buffer when they are running. So threads will only run signals when it is compatible with the global interpreter lock to do so. So as you said this would make the enqueing/dequeuing atomic because they are protected by the GIL.