Why Is Ruby Multithreading Slow?

And I decided to run it with ruby 't.rb' instead of from within irb. Of course, I didn’t get what I expected — I got no output at all, and my program exited immediately. It didn’t take me long to figure out the problem — the main thread exiting before the other threads ever got the processor — or to fix it by adding [producer, printer1, printer2].each { |t| t.join } to the end of the script.
Why Is Ruby Multithreading Slow? #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/why-is-ruby-multithreading-slow

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles