a = 1Thread.new(a) { |a| puts a; sleep 1; puts a}sleep 0.2a=2Thread.new(a) { |a| puts a; sleep 1; puts a}sleep 2
Standard input is empty
1 2 1 2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!