]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/conditn.tex
fall back on text value if no long/double value could be retrieved from the cell
[wxWidgets.git] / docs / latex / wx / conditn.tex
CommitLineData
eaaa6a06
JS
1\section{\class{wxCondition}}\label{wxcondition}
2
9063ea8e
VZ
3wxCondition variables correspond to pthread conditions or to Win32 event
4objects. They may be used in a multithreaded application to wait until the
5given condition becomes true which happens when the condition becomes signaled.
6
7For example, if a worker thread is doing some long task and another thread has
8to wait until it's finished, the latter thread will wait on the condition
9object and the worker thread will signal it on exit (this example is not
10perfect because in this particular case it would be much better to just
11\helpref{Wait()}{wxthreadwait} for the worker thread, but if there are several
12worker threads it already makes much more sense).
eaaa6a06
JS
13
14\wxheading{Derived from}
15
16None.
17
954b8ae6
JS
18\wxheading{Include files}
19
20<wx/thread.h>
21
eaaa6a06
JS
22\wxheading{See also}
23
24\helpref{wxThread}{wxthread}, \helpref{wxMutex}{wxmutex}
25
26\latexignore{\rtfignore{\wxheading{Members}}}
27
28\membersection{wxCondition::wxCondition}\label{wxconditionconstr}
29
30\func{}{wxCondition}{\void}
31
32Default constructor.
33
34\membersection{wxCondition::\destruct{wxCondition}}
35
36\func{}{\destruct{wxCondition}}{\void}
37
38Destroys the wxCondition object.
39
40\membersection{wxCondition::Broadcast}\label{wxconditionbroadcast}
41
42\func{void}{Broadcast}{\void}
43
44Broadcasts to all waiting objects.
45
46\membersection{wxCondition::Signal}\label{wxconditionsignal}
47
48\func{void}{Signal}{\void}
49
50Signals the object.
51
52\membersection{wxCondition::Wait}\label{wxconditionwait}
53
54\func{void}{Wait}{\param{wxMutex\&}{ mutex}}
55
56Waits indefinitely.
57
58\func{bool}{Wait}{\param{wxMutex\&}{ mutex}, \param{unsigned long}{ sec}, \param{unsigned long}{ nsec}}
59
60Waits until a signal is raised or the timeout has elapsed.
61
62\wxheading{Parameters}
63
64\docparam{mutex}{wxMutex object.}
65
66\docparam{sec}{Timeout in seconds}
67
68\docparam{nsec}{Timeout nanoseconds component (added to {\it sec}).}
69
70\wxheading{Return value}
71
72The second form returns if the signal was raised, or FALSE if there was a timeout.
73