Actions
Bug #12405
closedQueue doesn't work inside of trap
Bug #12405: Queue doesn't work inside of trap
Description
when adding things to the queue inside that trap blocking pop never unblocks
q = Queue.new Signal.trap 'INT' do puts "got INT" q << 'something' end Thread.new { loop { sleep 1 Process.kill :INT, $$ } } q.pop I know that there are limitations of what can be done inside of trap.
Looking at this https://bugs.ruby-lang.org/issues/6128 it looks like I should be able to use Queue inside a trap, but code above runs forever.
Also in jruby it behaives as expected ( at least in my understanding )
Actions