Subj : Re: workq: condvar vs semaphore To : comp.programming.threads From : Sean Kelly Date : Fri Aug 05 2005 03:43 pm David Tiktin wrote: > > Wow, that was fast. Thanks for the reference! That's a terrific > discussion. Do I understand that the point is (in the context of my > question) that condvars are just the right tool for the job? (And I > should get the book!) If so, and I haven't got them (Win32, say), > what's the next best thing? Yes, they are :) But if a third-party condvar implementation isn't your cup of tea (Boost has one, and a thread pool as well IIRC) then you can solve the problem a number of different ways. They might just not be quite as efficient, or they might have prioritization issues in some cases. All of them probably involve Windows events or semaphores. A final alternative would be to use the built-in Windows thread pooling mechanism. Do a search for QueueUserWorkItem and BindIoCompletionCallback to see the two prepackaged choices available (or dig a bit deeper and use completion ports directly). Sean .