From: Gary Wright Date: 2007-11-07T07:46:29+09:00 Subject: Re: Changing date backward messes up threaded sleep On Nov 6, 2007, at 4:39 PM, Robert Williams wrote: > Anyway, my work around was to have a c program send a IPC message > to the > scheduler every second. At which point the scheduler would watch for > unusual time deviations and handle things accordingly...i.e. clean > up a > sleeping thread. Yikes! You have a scheduling system that spans an entire calendar year that needs 1-second granularity? The fact that you even mention a 'calendar' indicates to me that you want events to be synched to wall-clock time anyway--so it sounds like a contradiction to want to ignore wall-clock changes. Most likely though, I'm not aware of the entire context you are working in. FYI, in reading the Ruby code during this thread I think I noticed that if there is only a single thread that sleep(x) actually uses select() directly to wait for the elapsed time. I guess my point is that if you really want a process to send you an IPC message every second you can do that with Ruby also--just don't start any other threads. Gary Wright