1 \section{\class{wxThread
}}\label{wxthread
}
3 A wxThread manages a system thread, code which executes as a mini-process within the application.
5 \wxheading{Derived from
}
11 \helpref{wxMutex
}{wxmutex
},
\helpref{wxCondition
}{wxcondition
}
13 \latexignore{\rtfignore{\wxheading{Members
}}}
15 \membersection{wxThread::wxThread
}\label{wxthreadconstr
}
17 \func{}{wxThread
}{\void}
21 \membersection{wxThread::
\destruct{wxThread
}}
23 \func{}{\destruct{wxThread
}}{\void}
25 Destroys the wxThread object.
27 \membersection{wxThread::Create
}\label{wxthreadcreate
}
29 \func{wxThreadError
}{Create
}{\void}
31 Creates a thread control.
33 \wxheading{Return value
}
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.
}
44 \membersection{wxThread::DeferDestroy
}\label{wxthreaddeferdestroy
}
46 \func{void
}{DeferDestroy
}{\param{bool
}{ defer
}}
48 If
{\it defer
} is TRUE, defers thread destruction. This function affects the
51 \membersection{wxThread::Destroy
}\label{wxthreaddestroy
}
53 \func{wxThreadError
}{Destroy
}{\void}
55 Destroys the thread immediately unless the application has specified deferral via
\helpref{wxThread::DeferDestroy
}{wxthreaddeferdestroy
}.
57 \wxheading{Return value
}
62 \begin{twocollist
}\itemsep=
0pt
63 \twocolitem{{\bf THREAD
\_NO\_ERROR}}{There was no error.
}
64 \twocolitem{{\bf THREAD
\_NOT\_RUNNING}}{The thread is not running.
}
67 \membersection{wxThread::GetID
}\label{wxthreadgetid
}
69 \constfunc{unsigned long
}{GetID
}{\void}
71 Gets the thread identifier.
73 \membersection{wxThread::GetPriority
}\label{wxthreadgetpriority
}
75 \constfunc{int
}{GetPriority
}{\void}
77 Gets the priority of the thread, between zero and
100.
79 The following priorities are already defined:
82 \begin{twocollist
}\itemsep=
0pt
83 \twocolitem{{\bf WXTHREAD
\_MIN\_PRIORITY}}{0}
84 \twocolitem{{\bf WXTHREAD
\_DEFAULT\_PRIORITY}}{50}
85 \twocolitem{{\bf WXTHREAD
\_MAX\_PRIORITY}}{100}
88 \membersection{wxThread::IsAlive
}\label{wxthreadisalive
}
90 \constfunc{bool
}{IsAlive
}{\void}
92 Returns TRUE if the thread is alive.
94 \membersection{wxThread::IsMain
}\label{wxthreadismain
}
96 \constfunc{bool
}{IsMain
}{\void}
98 Returns TRUE if the thread is the main application thread.
100 \membersection{wxThread::Join
}\label{wxthreadjoin
}
102 \func{void*
}{Join
}{\void}
104 Waits for the termination of the thread. Returns a platform-specific exit code. TODO
106 \membersection{wxThread::OnExit
}\label{wxthreadonexit
}
108 \func{void
}{OnExit
}{\void}
110 Called when the thread exits. The default implementation calls
\helpref{wxThread::Join
}{wxthreadjoin
}.
112 \membersection{wxThread::SetPriority
}\label{wxthreadsetpriority
}
114 \func{void
}{SetPriority
}{\param{int
}{ priority
}}
116 Sets the priority of the thread, between zero and
100. This must be set before the thread is created.
118 The following priorities are already defined:
121 \begin{twocollist
}\itemsep=
0pt
122 \twocolitem{{\bf WXTHREAD
\_MIN\_PRIORITY}}{0}
123 \twocolitem{{\bf WXTHREAD
\_DEFAULT\_PRIORITY}}{50}
124 \twocolitem{{\bf WXTHREAD
\_MAX\_PRIORITY}}{100}
130 %%% TeX-master: "referenc"