]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/thread.tex
Corrected some problems I introduced, added tabevent.tex.
[wxWidgets.git] / docs / latex / wx / thread.tex
CommitLineData
eaaa6a06
JS
1\section{\class{wxThread}}\label{wxthread}
2
3A wxThread manages a system thread, code which executes as a mini-process within the application.
4
5\wxheading{Derived from}
6
7None.
8
9\wxheading{See also}
10
11\helpref{wxMutex}{wxmutex}, \helpref{wxCondition}{wxcondition}
12
13\latexignore{\rtfignore{\wxheading{Members}}}
14
15\membersection{wxThread::wxThread}\label{wxthreadconstr}
16
17\func{}{wxThread}{\void}
18
19Default constructor.
20
21\membersection{wxThread::\destruct{wxThread}}
22
23\func{}{\destruct{wxThread}}{\void}
24
25Destroys the wxThread object.
26
27\membersection{wxThread::Create}\label{wxthreadcreate}
28
29\func{wxThreadError}{Create}{\void}
30
31Creates a thread control.
32
33\wxheading{Return value}
34
35One of:
36
37\twocolwidtha{7cm}
38\begin{twocollist}\itemsep=0pt
39\twocolitem{{\bf THREAD\_NO\_ERROR}}{There was no error.}
40\twocolitem{{\bf THREAD\_NO\_RESOURCE}}{There were insufficient resources to create a new thread.}
41\twocolitem{{\bf THREAD\_RUNNING}}{The thread is already running.}
42\end{twocollist}
43
44\membersection{wxThread::DeferDestroy}\label{wxthreaddeferdestroy}
45
46\func{void}{DeferDestroy}{\param{bool}{ defer}}
47
48If {\it defer} is TRUE, defers thread destruction.
49
50\membersection{wxThread::Destroy}\label{wxthreaddestroy}
51
52\func{wxThreadError}{Destroy}{\void}
53
54Destroys the thread immediately unless the application has specified deferral via \helpref{wxThread::DeferDestroy}{deferdestroy}.
55
56\wxheading{Return value}
57
58One of:
59
60\twocolwidtha{7cm}
61\begin{twocollist}\itemsep=0pt
62\twocolitem{{\bf THREAD\_NO\_ERROR}}{There was no error.}
63\twocolitem{{\bf THREAD\_NOT\_RUNNING}}{The thread is not running.}
64\end{twocollist}
65
66\membersection{wxThread::GetID}\label{wxthreadgetid}
67
68\constfunc{unsigned long}{GetID}{\void}
69
70Gets the thread identifier.
71
72\membersection{wxThread::GetPriority}\label{wxthreadgetpriority}
73
74\constfunc{int}{GetPriority}{\void}
75
76Gets the priority of the thread, between zero and 100.
77
78The following priorities are already defined:
79
80\twocolwidtha{7cm}
81\begin{twocollist}\itemsep=0pt
82\twocolitem{{\bf WXTHREAD_MIN_PRIORITY}}{0}
83\twocolitem{{\bf WXTHREAD_DEFAULT_PRIORITY}}{50}
84\twocolitem{{\bf WXTHREAD_MAX_PRIORITY}}{100}
85\end{twocollist}
86
87\membersection{wxThread::IsAlive}\label{wxthreadisalive}
88
89\constfunc{bool}{IsAlive}{\void}
90
91Returns TRUE if the thread is alive.
92
93\membersection{wxThread::IsMain}\label{wxthreadismain}
94
95\constfunc{bool}{IsMain}{\void}
96
97Returns TRUE if the thread is the main application thread.
98
99\membersection{wxThread::Join}\label{wxthreadjoin}
100
101\func{void*}{Join}{\void}
102
103Waits for the termination of the thread. Returns a platform-specific exit code. TODO
104
105\membersection{wxThread::OnExit}\label{wxthreadonexit}
106
107\func{void}{OnExit}{\void}
108
109Called when the thread exits. The default implementation calls \helpref{wxThread::Join}{wxthreadjoin}.
110
111\membersection{wxThread::SetPriority}\label{wxthreadsetpriority}
112
113\func{void}{SetPriority}{\param{int}{ priority}}
114
115Sets the priority of the thread, between zero and 100. This must be set before the thread is created.
116
117The following priorities are already defined:
118
119\twocolwidtha{7cm}
120\begin{twocollist}\itemsep=0pt
121\twocolitem{{\bf WXTHREAD_MIN_PRIORITY}}{0}
122\twocolitem{{\bf WXTHREAD_DEFAULT_PRIORITY}}{50}
123\twocolitem{{\bf WXTHREAD_MAX_PRIORITY}}{100}
124\end{twocollist}
125