From: Ben Giddings Date: 2004-06-11T08:00:00+09:00 Subject: Re: The dangers of sleeping ... Dale Martenson wrote: > This problem came up as part of a large ruby server application where an > operator noticed the time on the server was way off and set the clock back a > couple of hours to correct the problem. The system locked up. Threads using > the sleep function never woke up. There's your problem. See, the thread should more properly be titled 'the dangers of messing with the clock on a running system'. Take a look at the NTP RFCs. They go to enormous pains to slew the clock, rather than stepping it. If you ever move a computer's clock backward, expect crazy things to happen. Moving it forward suddenly isn't good, but it isn't nearly as dangerous. This doesn't mean this isn't a bug, and it doesn't mean that software shouldn't be written with the possibility of this happening in mind, but it's really the fault of the person running the system. If you essentially 'mess with causality' you should expect things to break. Ben