X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23efb556d96ee8bf71f38f208b0f9230d7555a30..fa1af598d62a71f7e7054a0dcc7b209e91e58873:/docs/latex/wx/conditn.tex diff --git a/docs/latex/wx/conditn.tex b/docs/latex/wx/conditn.tex index 42fef3052e..c39e2c1689 100644 --- a/docs/latex/wx/conditn.tex +++ b/docs/latex/wx/conditn.tex @@ -13,8 +13,12 @@ worker threads it already makes much more sense). Note that a call to \helpref{Signal()}{wxconditionsignal} may happen before the other thread calls \helpref{Wait()}{wxconditionwait} and, just as with the -pthread conditions, the signal is then lost and so if you want to be sure to -get it you must use a mutex together with the condition variable. +pthread conditions, the signal is then lost and so if you want to be sure that +you don't miss it you must keep the mutex associated with the condition +initially locked and lock it again before calling +\helpref{Signal()}{wxconditionsignal}. Of course, this means that this call is +going to block until \helpref{Wait()}{wxconditionwait} is called by another +thread. \wxheading{Example} @@ -107,7 +111,7 @@ None. \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxCondition::wxCondition}\label{wxconditionconstr} +\membersection{wxCondition::wxCondition}\label{wxconditionctor} \func{}{wxCondition}{\param{wxMutex\& }{mutex}} @@ -115,9 +119,9 @@ Default and only constructor. The {\it mutex} must be locked by the caller before calling \helpref{Wait}{wxconditionwait} function. Use \helpref{IsOk}{wxconditionisok} to check if the object was successfully -intiialized. +initialized. -\membersection{wxCondition::\destruct{wxCondition}} +\membersection{wxCondition::\destruct{wxCondition}}\label{wxconditiondtor} \func{}{\destruct{wxCondition}}{\void} @@ -141,7 +145,7 @@ not. \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} @@ -177,7 +181,7 @@ Wait or the thread may sleep forever. \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} @@ -186,7 +190,7 @@ Returns {\tt wxCOND\_NO\_ERROR} on success, another value if an error occured. \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. @@ -201,6 +205,6 @@ timeout expires. \wxheading{Return value} Returns {\tt wxCOND\_NO\_ERROR} if the condition was signalled, -{\tt wxCOND\_TIMEOUT} if the timeout elapsed ebfore this happened or another +{\tt wxCOND\_TIMEOUT} if the timeout elapsed before this happened or another error code from wxCondError enum.