// tell the other(s) thread(s) that we're about to terminate: we must
// lock the mutex first or we might signal the condition before the
// waiting threads start waiting on it!
- wxMutexLocker lock(m_mutex);
- m_condition.Broadcast(); // same as Signal() here -- one waiter only
+ wxMutexLocker lock(*m_mutex);
+ m_condition->Broadcast(); // same as Signal() here -- one waiter only
return 0;
}
<wx/thread.h>
+\wxheading{Library}
+
+\helpref{wxBase}{librarieslist}
+
\wxheading{See also}
\helpref{wxThread}{wxthread}, \helpref{wxMutex}{wxmutex}
\constfunc{bool}{IsOk}{\void}
Returns {\tt true} if the object had been initialized successfully, {\tt false}
-if an error occured.
+if an error occurred.
\membersection{wxCondition::Signal}\label{wxconditionsignal}
This method atomically releases the lock on the mutex associated with this
condition (this is why it must be locked prior to calling Wait) and puts the
thread to sleep until \helpref{Signal}{wxconditionsignal} or
-\helpref{Broadcast}{wxconditionbroadcast} is called.
+\helpref{Broadcast}{wxconditionbroadcast} is called. It then locks the mutex
+again and returns.
Note that even if \helpref{Signal}{wxconditionsignal} had been called before
Wait without waking up any thread, the thread would still wait for another one
\wxheading{Return value}
-Returns {\tt wxCOND\_NO\_ERROR} on success, another value if an error occured.
+Returns {\tt wxCOND\_NO\_ERROR} on success, another value if an error occurred.
\wxheading{See also}
\membersection{wxCondition::WaitTimeout}\label{wxconditionwaittimeout}
-\func{wxCondError}{Wait}{\param{unsigned long}{ milliseconds}}
+\func{wxCondError}{WaitTimeout}{\param{unsigned long}{ milliseconds}}
Waits until the condition is signalled or the timeout has elapsed.