Closed original-brownbear closed 6 years ago
@andrewvc no huge rush here I guess: but urgh the API here changed in JRuby 9k it seems :( => is this important enough to back port to 5.6
? (if yes we could just add some conditional Ruby syntax and an eval
to set up the interrupt clearing method I guess :))
@original-brownbear given that we're seeing this bug in 5.x now, I think that yes, we should support 5.x. My preference is not to backport it, since 5.x uses the same version of the filter here, but to use a conditional to use the correct API based on the current JRuby version.
Closing in favor of #131
RubyThread
checks for interrupts with this code:if we simply clear the Java thread, a subsequent invocation of Ruby code may still throw because the interrupted state wasn't cleared quickly enough on the
RubyThread
'sinterruptFlag
as well.=> Clear it via
Thread.handle_interrupt
(I put it in the conditional to avoid setting up the block on every call needlessly when there aren't any interrupts)