Double lock on wxMutex(wxMUTEX_DEFAULT) allowed?
Vadim Zeitlin
vadim at wxwidgets.org
Tue Oct 2 05:12:56 PDT 2007
On Tue, 2 Oct 2007 14:11:16 +0200 (CEST) koen at vermeer.tv wrote:
> > KV> Then, the next question is obviously how to work around this.
> > If you mean how to work around Win32 mutexes always being recursive, then
> > I don't know.
>
> The documentation suggests using wxSemaphore with maxcount = 1. I guess
> that would be too easy...
The semaphores don't have exactly the same semantics as mutexes, notably
you can release a semaphore from a thread which doesn't own it. This may or
may not matter, but they are not exactly the same.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list