1998-06-14 08:11:50 -04:00
|
|
|
\section{\class{wxThread}}\label{wxthread}
|
|
|
|
|
|
|
|
A wxThread manages a system thread, code which executes as a mini-process within the application.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
None.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxMutex}{wxmutex}, \helpref{wxCondition}{wxcondition}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxThread::wxThread}\label{wxthreadconstr}
|
|
|
|
|
|
|
|
\func{}{wxThread}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
|
|
|
\membersection{wxThread::\destruct{wxThread}}
|
|
|
|
|
|
|
|
\func{}{\destruct{wxThread}}{\void}
|
|
|
|
|
|
|
|
Destroys the wxThread object.
|
|
|
|
|
|
|
|
\membersection{wxThread::Create}\label{wxthreadcreate}
|
|
|
|
|
|
|
|
\func{wxThreadError}{Create}{\void}
|
|
|
|
|
|
|
|
Creates a thread control.
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
One of:
|
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{{\bf THREAD\_NO\_ERROR}}{There was no error.}
|
|
|
|
\twocolitem{{\bf THREAD\_NO\_RESOURCE}}{There were insufficient resources to create a new thread.}
|
|
|
|
\twocolitem{{\bf THREAD\_RUNNING}}{The thread is already running.}
|
|
|
|
\end{twocollist}
|
|
|
|
|
|
|
|
\membersection{wxThread::DeferDestroy}\label{wxthreaddeferdestroy}
|
|
|
|
|
|
|
|
\func{void}{DeferDestroy}{\param{bool}{ defer}}
|
|
|
|
|
1998-07-08 15:06:13 -04:00
|
|
|
If {\it defer} is TRUE, defers thread destruction. This function affects the
|
|
|
|
calling thread.
|
1998-06-14 08:11:50 -04:00
|
|
|
|
|
|
|
\membersection{wxThread::Destroy}\label{wxthreaddestroy}
|
|
|
|
|
|
|
|
\func{wxThreadError}{Destroy}{\void}
|
|
|
|
|
1998-07-29 02:51:33 -04:00
|
|
|
Destroys the thread immediately unless the application has specified deferral via \helpref{wxThread::DeferDestroy}{wxthreaddeferdestroy}.
|
1998-06-14 08:11:50 -04:00
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
One of:
|
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{{\bf THREAD\_NO\_ERROR}}{There was no error.}
|
|
|
|
\twocolitem{{\bf THREAD\_NOT\_RUNNING}}{The thread is not running.}
|
|
|
|
\end{twocollist}
|
|
|
|
|
|
|
|
\membersection{wxThread::GetID}\label{wxthreadgetid}
|
|
|
|
|
|
|
|
\constfunc{unsigned long}{GetID}{\void}
|
|
|
|
|
|
|
|
Gets the thread identifier.
|
|
|
|
|
|
|
|
\membersection{wxThread::GetPriority}\label{wxthreadgetpriority}
|
|
|
|
|
|
|
|
\constfunc{int}{GetPriority}{\void}
|
|
|
|
|
|
|
|
Gets the priority of the thread, between zero and 100.
|
|
|
|
|
|
|
|
The following priorities are already defined:
|
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
1998-07-17 08:34:50 -04:00
|
|
|
\twocolitem{{\bf WXTHREAD\_MIN\_PRIORITY}}{0}
|
|
|
|
\twocolitem{{\bf WXTHREAD\_DEFAULT\_PRIORITY}}{50}
|
|
|
|
\twocolitem{{\bf WXTHREAD\_MAX\_PRIORITY}}{100}
|
1998-06-14 08:11:50 -04:00
|
|
|
\end{twocollist}
|
|
|
|
|
|
|
|
\membersection{wxThread::IsAlive}\label{wxthreadisalive}
|
|
|
|
|
|
|
|
\constfunc{bool}{IsAlive}{\void}
|
|
|
|
|
|
|
|
Returns TRUE if the thread is alive.
|
|
|
|
|
|
|
|
\membersection{wxThread::IsMain}\label{wxthreadismain}
|
|
|
|
|
|
|
|
\constfunc{bool}{IsMain}{\void}
|
|
|
|
|
|
|
|
Returns TRUE if the thread is the main application thread.
|
|
|
|
|
|
|
|
\membersection{wxThread::Join}\label{wxthreadjoin}
|
|
|
|
|
|
|
|
\func{void*}{Join}{\void}
|
|
|
|
|
|
|
|
Waits for the termination of the thread. Returns a platform-specific exit code. TODO
|
|
|
|
|
|
|
|
\membersection{wxThread::OnExit}\label{wxthreadonexit}
|
|
|
|
|
|
|
|
\func{void}{OnExit}{\void}
|
|
|
|
|
|
|
|
Called when the thread exits. The default implementation calls \helpref{wxThread::Join}{wxthreadjoin}.
|
|
|
|
|
|
|
|
\membersection{wxThread::SetPriority}\label{wxthreadsetpriority}
|
|
|
|
|
|
|
|
\func{void}{SetPriority}{\param{int}{ priority}}
|
|
|
|
|
|
|
|
Sets the priority of the thread, between zero and 100. This must be set before the thread is created.
|
|
|
|
|
|
|
|
The following priorities are already defined:
|
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
1998-07-17 08:34:50 -04:00
|
|
|
\twocolitem{{\bf WXTHREAD\_MIN\_PRIORITY}}{0}
|
|
|
|
\twocolitem{{\bf WXTHREAD\_DEFAULT\_PRIORITY}}{50}
|
|
|
|
\twocolitem{{\bf WXTHREAD\_MAX\_PRIORITY}}{100}
|
1998-06-14 08:11:50 -04:00
|
|
|
\end{twocollist}
|
|
|
|
|
1998-07-17 08:34:50 -04:00
|
|
|
|
|
|
|
%%% Local Variables:
|
|
|
|
%%% mode: latex
|
|
|
|
%%% TeX-master: "referenc"
|
|
|
|
%%% End:
|