Ruby threadering

how do i threadering in ruby?

You’d probably need a threaderer.

Or, for multithreading, you could start with this:

  threads = []
  10.times do |i|
    threads << Thread.new do
      sleep rand*5
      puts "#{i} !!"
    end
  end
  threads.each {|t| t.join }
  puts 'All done'

There’s plenty of documentation for the Thread class online. Sorry I
can’g
link go it on my phone.

On 31 Μαϊ 2014, at 04:38 , Hector M. [email protected] wrote:

how do i threadering in ruby?

here: http://lmgtfy.com/?q=ruby+threading

Panagiotis (atmosx) Atmatzidis

email: [email protected]
URL: http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

“As you set out for Ithaca, hope the voyage is a long one, full of
adventure, full of discovery […]” - C. P. Cavafy

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs