[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [OT] Win32 condition variable implementation

From: Tobias Ringstrom <tobias_at_ringstrom.mine.nu>
Date: 2003-09-11 11:04:24 CEST

Branko Čibej wrote:
> Yes, but it doesn't implement the semantics of POSIX condition variables
> -- it doesn't release and reacquire the mutex associated with the
> condition whie waiting for the signal. The problem with these simple
> inplementations on Windows has always been that
>
> release(mutex)
> wait(event)
> acquire(mutex)
>
> has a race condition because the release and wait can't be performed
> atomically.

Have you considered using SignalObjectAndWait?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/signalobjectandwait.asp

The only problem is that it's not available in Win 95/98/ME.

/Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 11 11:05:15 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.