News for hackers. Stuff that matters.
Re:Ruby 1.9, massive boost in threading preformance by richcollins on Tuesday July 29, 2008 @12:03PM (#260668)
With Ruby threads you get the worst of both worlds. They are preemptive and user-level.

1.9 will introduce native threads, which aren't much better. Each native thread requires megabytes of memory for its stack. Co-routines require only 64k of memory.

Concurrency in Rubinius should require even less memory overhead as it is stackless.

Re:Ruby 1.9, massive boost in threading preformance by tx on Tuesday July 29, 2008 @11:12PM (#261422)
1.9 will introduce native threads, which aren't much better.

What? They're not only "better", they're actually _threads_, i.e. are able to run in parallel, you know? What are Ruby 1.8 threads good for, except for sitting on sockets?

Re:Ruby 1.9, massive boost in threading preformance by tesseract on Tuesday July 29, 2008 @11:27PM (#261430)
Producer/consumer where there are multiple I/O bound producers (examples that come to mind: RSS reader, web spider, multiple-file search). They can also be a useful abstraction for things like waiting for events from multiple sources, or running quasi-realtime simulations.

I agree, though, that real threads would be a significant improvement. Or better yet, MxN threads like GHC.