Subj : Re: Question : usage of conditional variables. To : comp.programming.threads From : David Schwartz Date : Thu Jun 09 2005 02:42 pm "David Butenhof" wrote in message news:42A83644.7050902@hp.com... > If you're really trying to sleep "just to sleep", without any particular > intent (you're not waiting "for something"), then you probably should be > using some mechanism other than condition variables. They're designed > specifically to allow you to reliably wait for some defined change in a > predicate that's protected by a mutex; and only for that. If you have some > vastly different purpose, a semaphore, or even a simple sleep() call, > might be more appropriate. (But of course we can't give any specific > advice unless we know what you need, and why.) And, of course, if you're just using condition variable to sleep because you want to learn how to use them, your time would be better spent learning how to use them for their actual purpose. ;) DS .