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.
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.