Hui Gu wrote:
> Hi, I'm absolutely new to Ruby, but one thing I found strange is that
> thread.pass takes a very long time compare to sched_yield in C.  Does
> any one know why is that?

The last time i checked Thread#pass was implemented more like a sleep
for 6ms. I was able to use (from C) a sleep with 1ms in a close loop
without getting into problems (that was short enough for me).

cheers

Simon