wxCondition locking
Chris
chrismc911 at hotmail.com
Tue Jan 22 05:44:33 PST 2008
Thanks for your answer. I did not specify my question clearly:
What is the state of the mutex after the signal has been signalled and
the wait has been released? Do I have to lock the mutex manually to be
in a condition where I can perform the wait/signal again? Because I
have to manually lock the mutex at the very beginning.
Regards and thanks for you patience :)
Chris
On Jan 21, 11:43 pm, lesnew... at fmail.co.uk (Leslie Newell) wrote:
> Locking the mutex prevents any other thread from sending a signal. The
> mutex is locked initially in case the signaling thread(s) tries sending
> the signal before your receiving thread is ready for it. The wait()
> implicitly unlocks the mutex, allowing the signaling thread(s) to send
> the signal.
>
> The signaling thread locks the mutex so that another thread can't send a
> signal simultaneously.
>
> Les
>
> Chris wrote:
> > Thanks for your answer!
>
> > I have one more question on this: my condition is signalled severals
> > times during the application run. Do I have to lock the mutex again
> > once it has been signaled and the waiting thread has been triggered?
> > Or does the wait call lock the mutex again after the signal has been
> > triggered? Does the "unlock mutex" after the "send signal" unlock it
> > in this case?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscr... at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-h... at lists.wxwidgets.org
More information about the wx-users
mailing list