Double lock on wxMutex(wxMUTEX_DEFAULT) allowed?

koen at vermeer.tv koen at vermeer.tv
Tue Oct 2 06:57:42 PDT 2007


> On Tue, 2 Oct 2007 14:11:16 +0200 (CEST) koen at vermeer.tv wrote:
>
>  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.

In that case, this requires another fix from the documentation department.
Currently the doc on wxSemaphore reads

If maxcount is 1, the semaphore behaves exactly as a mutex.

Anyway, I'll try to find a way to work around all of this in my code. I
briefly looked for other mutex-implementations, most notably Boost's, but
they seem to suffer from the same problem.

Koen





More information about the wx-users mailing list