Fix Interrupt robustness. - #191
Conversation
3346442 to
cd5b12f
Compare
`IOError` can be raised in response to `@output.close`. `unblock` defers it and this can kill the scheduler. In addition normal `write` can block, or raise errors, etc. That's also a problem.
|
For context on why The confusing part is that the The failing path was roughly:
ec->interrupt_mask |= PENDING_INTERRUPT_MASK;
rb_funcall(scheduler, id_unblock, ...);
ec->interrupt_mask = saved_interrupt_mask;
RUBY_VM_CHECK_INTS(ec);While So That is why |
It turns out that Interrupt#signal is problematic... I don't know why, but if an
IOErroris triggered during it's activation duringThread#join, Ruby'sblocking_operationlist seems to get messed up.