Created
June 10, 2011 14:59
-
-
Save bklang/1018994 to your computer and use it in GitHub Desktop.
Pry threading test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'pry' | |
#require 'rbtrace' | |
puts $$ | |
threads = [] | |
threads << Thread.new do | |
loop do | |
puts "Thread 1" | |
sleep 1 | |
end | |
end | |
threads << Thread.new do | |
pry | |
end | |
threads << Thread.new do | |
loop do | |
puts "Thread 2" | |
sleep 1 | |
end | |
end | |
threads.each {|t| t.join } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another way to fix this with rvm:
Also works for other versions of Ruby.