./ruby/threads.rb

download original
#!/usr/bin/ruby

require 'thread'

#M=Mutex.new

threads = (0...7).map do
  Thread.new { sleep rand; load "threads_mod.rb" }
end

threads.each{|t| t.join}

  
back to ruby

(C) 1998-2017 Olaf Klischat <olaf.klischat@gmail.com>