9 ms·
There is a link in the article to a presentation. The author has not used threads because (apparently) threads in Ruby are green-threads. These are not that u
by acg 17y ago
There is a link in the article to a presentation. The author has not used threads because (apparently) threads in Ruby are green-threads. These are not that useful for a type of application that needs to block on I/O.
This also breaks the idea that Ruby=Unix somewhat: far more power is available when native threads are available including the ability to make use of multi-CPU.
- chuckfouts 17y agoIn MRI Ruby 1.8, Ruby creates a single native thread and all other threads run in that native thread. In Ruby 1.9, each Ruby thread is a native thread. In JRuby, Ruby uses native threads created via the JVM. Not sure about IronRuby, Rubinus, or Ruby EE. A tangled web of options for sure.