Skip to content

Instantly share code, notes, and snippets.

@jmettraux
Created February 16, 2009 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmettraux/64947 to your computer and use it in GitHub Desktop.
Save jmettraux/64947 to your computer and use it in GitHub Desktop.
(1..100).collect { |i|
Thread.new {
100.times { |j|
puts "hello from #{i} (#{j})"
#Thread.pass if j % 3
}
}
}.each { |t| t.join }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment