From: normalperson@... Date: 2014-12-13T05:27:13+00:00 Subject: [ruby-core:66825] [ruby-trunk - Bug #10595] [Open] interrupts not handled while finalizers running Issue #10595 has been reported by Eric Wong. ---------------------------------------- Bug #10595: interrupts not handled while finalizers running https://bugs.ruby-lang.org/issues/10595 * Author: Eric Wong * Status: Open * Priority: Normal * Assignee: * Category: core * Target version: current: 2.2.0 * ruby -v: trunk * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- Originally noted in [ruby-core:66635] Trying to Ctrl-C something like the following loop is not always successful: ~~~ f = proc { 1000.times {} } loop do ObjectSpace.define_finalizer(Object.new, f) end ~~~ The Interrupt is created and raised, but lost during the postponed job processing (rb_postponed_job_flush). Trying to mask out all interrupt flags (instead of just th->interrupt_mask |= POSTPONED_JOB_INTERRUPT_MASK) allows the interrupt to be handled, but this is not suitable for expensive finalizers. So I haven't figured out how to fix this, yet... Help appreciated, thanks. -- https://bugs.ruby-lang.org/