| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/jruby/jruby/jruby-1_7/samples/thread.rb | [Back] [Original] |
x = Thread.new { sleep 0.1; print "x"; print "y"; print "z" }
a = Thread.new { print "a"; print "b"; sleep 0.2; print "c" }
x.join # Let the threads finish before
a.join # main thread exits...
puts # newline
| Web Proxy Viewer | New URL | Original Page |