From: Navindra Umanee Date: 2005-02-18T13:29:44+09:00 Subject: Re: pulling my hair out, why won't Kernel.sleep(0) sleep? Sam Roberts wrote: > 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 would guess that the sleep is triggering the thread scheduler to check the queue for eligible threads to run. Probably sometimes the same thread is chosen and sometimes another thread. Not 100% sure. Cheers, Navin.