]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/conditn.tex
added base parameter to wxString::To[U]Long
[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
f6bcfd97 8to wait until it is finished, the latter thread will wait on the condition
9063ea8e
VZ
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 13
f6bcfd97
BP
14Once the thread(s) are signaled, the condition then resets to the not
15signaled state, ready to fire again.
16
eaaa6a06
JS
17\wxheading{Derived from}
18
19None.
20
954b8ae6
JS
21\wxheading{Include files}
22
23<wx/thread.h>
24
eaaa6a06
JS
25\wxheading{See also}
26
27\helpref{wxThread}{wxthread}, \helpref{wxMutex}{wxmutex}
28
29\latexignore{\rtfignore{\wxheading{Members}}}
30
31\membersection{wxCondition::wxCondition}\label{wxconditionconstr}
32
33\func{}{wxCondition}{\void}
34
35Default constructor.
36
37\membersection{wxCondition::\destruct{wxCondition}}
38
39\func{}{\destruct{wxCondition}}{\void}
40
41Destroys the wxCondition object.
42
43\membersection{wxCondition::Broadcast}\label{wxconditionbroadcast}
44
45\func{void}{Broadcast}{\void}
46
47Broadcasts to all waiting objects.
48
49\membersection{wxCondition::Signal}\label{wxconditionsignal}
50
51\func{void}{Signal}{\void}
52
53Signals the object.
54
55\membersection{wxCondition::Wait}\label{wxconditionwait}
56
f6bcfd97 57\func{void}{Wait}{\void}
eaaa6a06
JS
58
59Waits indefinitely.
60
f6bcfd97 61\func{bool}{Wait}{\param{unsigned long}{ sec}, \param{unsigned long}{ nsec}}
eaaa6a06
JS
62
63Waits until a signal is raised or the timeout has elapsed.
64
65\wxheading{Parameters}
66
eaaa6a06
JS
67\docparam{sec}{Timeout in seconds}
68
69\docparam{nsec}{Timeout nanoseconds component (added to {\it sec}).}
70
71\wxheading{Return value}
72
73The second form returns if the signal was raised, or FALSE if there was a timeout.
74