Subj : Re: win32 threads broken (was Win32 condition variables redux) To : comp.programming.threads From : Joe Seigh Date : Wed Aug 03 2005 10:20 pm d|dq wrote: > :) > > It's Hell to implement correctly and impossible to verify. It must be > software. > > Really, your signature is an insult to lemonade, which is easy to > produce and easy to identify. ;) > > Seriously, I am starting to understand why some people think threads > are a bad idea. > Only if the api's were badly designed in the first place as in the case of windows. What make's it worse is inadequate low level api's needed to rectify the problem. But I wouldn't take the fact that working with low level api's is difficult as an indication of thread programming in general. There are easy to use high level api's such as pipes or fifo queues which allow you to implement producer/consumer quite easily without worrying about tricky details of threaded programming. BTW, I checked out all of the windows synchronization objects and they're all events that have to be reset by the waiting thread, not the signaler, in order to work correctly. The only exception appears to be the directory change notification handle which acts sort of like an eventcount, you'd signal by modifying the directory it's set on. Not very practical for basing condition variables on. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .