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 << do
      sleep rand*5
      puts "#{i} !!"
  threads.each {|t| t.join }
  puts 'All done'

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

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

how do i threadering in ruby?


Panagiotis (atmosx) Atmatzidis

email: [email protected]
GnuPG ID: 0x1A7BFEC5
gpg --keyserver --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