Subj : Re: SEM_UNDO substitute on windows To : comp.programming.threads From : Vyacheslav Kononenko Date : Tue May 24 2005 07:40 am Joe Seigh wrote: > On 23 May 2005 00:14:37 -0700, wrote: > > > Hi, > > Is there any substitute for SEM_UNDO functionality (offered by unix > > semaphore implementation) on Windows. Solution may use anything other > > than semaphore if it offers similar functionality. > > Thanks in advance, > > Deepesh > > > Windows is already broken. You don't need to break it any further > with some dubious use of SEM_UNDO. There are some legtimate uses > of SEM_UNDO but I doubt this is the case here. > > You can wait on thread handles or there may be some general notification > mechanism for thread termination. Though if you're thinking of "unlocking" > a semaphore when the protected data is in an undefined state, it would be > much easier and quicker to just not use the semaphore in the first place. > > > -- > Joe Seigh > > When you get lemons, you make lemonade. > When you get hardware, you make software. Hmm. How about a case when I have one writer and many readers and one of the readers crashes? That should be safe to just unlock in this case. Am I wrong? Regards, Vyacheslav .