From: nagachika00@... Date: 2017-03-13T00:54:49+00:00 Subject: [ruby-core:80083] [Ruby trunk Bug#12405] Queue doesn't work inside of trap Issue #12405 has been updated by Tomoyuki Chikanaga. Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE to 2.1: UNKNOWN, 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE ---------------------------------------- Bug #12405: Queue doesn't work inside of trap https://bugs.ruby-lang.org/issues/12405#change-63509 * Author: Kirill Radzikhovskyy * Status: Closed * Priority: Normal * Assignee: Koichi Sasada * Target version: * ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] * Backport: 2.1: UNKNOWN, 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE ---------------------------------------- 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 ) -- https://bugs.ruby-lang.org/ Unsubscribe: