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.
50 \membersection{wxThread::Destroy
}\label{wxthreaddestroy
}
52 \func{wxThreadError
}{Destroy
}{\void}
54 Destroys the thread immediately unless the application has specified deferral via
\helpref{wxThread::DeferDestroy
}{deferdestroy
}.
56 \wxheading{Return value
}
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.
}
66 \membersection{wxThread::GetID
}\label{wxthreadgetid
}
68 \constfunc{unsigned long
}{GetID
}{\void}
70 Gets the thread identifier.
72 \membersection{wxThread::GetPriority
}\label{wxthreadgetpriority
}
74 \constfunc{int
}{GetPriority
}{\void}
76 Gets the priority of the thread, between zero and
100.
78 The following priorities are already defined:
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}
87 \membersection{wxThread::IsAlive
}\label{wxthreadisalive
}
89 \constfunc{bool
}{IsAlive
}{\void}
91 Returns TRUE if the thread is alive.
93 \membersection{wxThread::IsMain
}\label{wxthreadismain
}
95 \constfunc{bool
}{IsMain
}{\void}
97 Returns TRUE if the thread is the main application thread.
99 \membersection{wxThread::Join
}\label{wxthreadjoin
}
101 \func{void*
}{Join
}{\void}
103 Waits for the termination of the thread. Returns a platform-specific exit code. TODO
105 \membersection{wxThread::OnExit
}\label{wxthreadonexit
}
107 \func{void
}{OnExit
}{\void}
109 Called when the thread exits. The default implementation calls
\helpref{wxThread::Join
}{wxthreadjoin
}.
111 \membersection{wxThread::SetPriority
}\label{wxthreadsetpriority
}
113 \func{void
}{SetPriority
}{\param{int
}{ priority
}}
115 Sets the priority of the thread, between zero and
100. This must be set before the thread is created.
117 The following priorities are already defined:
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}