pry/pry — Issue #328: Readline.readline blocks threads
Author: cjameshuff
Created: 2011-11-01 19:07:06+00:00
State: open

Running something like `t = Thread.new {10.times {|x| puts x; sleep 1}}` will not produce the expected results. When using the default Readline input, all threads are blocked by Pry waiting for input, and will only get a brief chance to run after a line is entered before the next readline() call blocks things again. This is actually caused by a Ruby issue: http://redmine.ruby-lang.org/issues/5539

This is probably not worth adding a dependency on RubyInline for a workaround, but the BetterReadline workaround listed in that issue might make a good addition to the examples.