From: Yukihiro Matsumoto Date: 2005-02-18T13:50:26+09:00 Subject: Re: pulling my hair out, why won't Kernel.sleep(0) sleep? Hi, In message "Re: pulling my hair out, why won't Kernel.sleep(0) sleep?" on Fri, 18 Feb 2005 13:07:28 +0900, Sam Roberts writes: |> The documentation is wrong. Oops. I will fix. |I had started to notice that sometimes the code busy loops, and |sometimes it doesn't, it doesn't matter whether I make any code changes, |that turned out to be unrelated. | |Do you have any idea why this should be? What does Kernel.sleep(0) |actually do? I guess it was busy looping, but there were other threads to work sometimes. sleep(0) does not sleep but causes context switch. matz.