]>
Commit | Line | Data |
---|---|---|
eaaa6a06 JS |
1 | \section{\class{wxThread}}\label{wxthread} |
2 | ||
3 | A wxThread manages a system thread, code which executes as a mini-process within the application. | |
4 | ||
5 | \wxheading{Derived from} | |
6 | ||
7 | None. | |
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 | ||
19 | Default constructor. | |
20 | ||
21 | \membersection{wxThread::\destruct{wxThread}} | |
22 | ||
23 | \func{}{\destruct{wxThread}}{\void} | |
24 | ||
25 | Destroys the wxThread object. | |
26 | ||
27 | \membersection{wxThread::Create}\label{wxthreadcreate} | |
28 | ||
29 | \func{wxThreadError}{Create}{\void} | |
30 | ||
31 | Creates a thread control. | |
32 | ||
33 | \wxheading{Return value} | |
34 | ||
35 | One 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 | ||
4d1f281b GL |
48 | If {\it defer} is TRUE, defers thread destruction. This function affects the |
49 | calling thread. | |
eaaa6a06 JS |
50 | |
51 | \membersection{wxThread::Destroy}\label{wxthreaddestroy} | |
52 | ||
53 | \func{wxThreadError}{Destroy}{\void} | |
54 | ||
55 | Destroys the thread immediately unless the application has specified deferral via \helpref{wxThread::DeferDestroy}{deferdestroy}. | |
56 | ||
57 | \wxheading{Return value} | |
58 | ||
59 | One of: | |
60 | ||
61 | \twocolwidtha{7cm} | |
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.} | |
65 | \end{twocollist} | |
66 | ||
67 | \membersection{wxThread::GetID}\label{wxthreadgetid} | |
68 | ||
69 | \constfunc{unsigned long}{GetID}{\void} | |
70 | ||
71 | Gets the thread identifier. | |
72 | ||
73 | \membersection{wxThread::GetPriority}\label{wxthreadgetpriority} | |
74 | ||
75 | \constfunc{int}{GetPriority}{\void} | |
76 | ||
77 | Gets the priority of the thread, between zero and 100. | |
78 | ||
79 | The following priorities are already defined: | |
80 | ||
81 | \twocolwidtha{7cm} | |
82 | \begin{twocollist}\itemsep=0pt | |
e14dccff KB |
83 | \twocolitem{{\bf WXTHREAD\_MIN\_PRIORITY}}{0} |
84 | \twocolitem{{\bf WXTHREAD\_DEFAULT\_PRIORITY}}{50} | |
85 | \twocolitem{{\bf WXTHREAD\_MAX\_PRIORITY}}{100} | |
eaaa6a06 JS |
86 | \end{twocollist} |
87 | ||
88 | \membersection{wxThread::IsAlive}\label{wxthreadisalive} | |
89 | ||
90 | \constfunc{bool}{IsAlive}{\void} | |
91 | ||
92 | Returns TRUE if the thread is alive. | |
93 | ||
94 | \membersection{wxThread::IsMain}\label{wxthreadismain} | |
95 | ||
96 | \constfunc{bool}{IsMain}{\void} | |
97 | ||
98 | Returns TRUE if the thread is the main application thread. | |
99 | ||
100 | \membersection{wxThread::Join}\label{wxthreadjoin} | |
101 | ||
102 | \func{void*}{Join}{\void} | |
103 | ||
104 | Waits for the termination of the thread. Returns a platform-specific exit code. TODO | |
105 | ||
106 | \membersection{wxThread::OnExit}\label{wxthreadonexit} | |
107 | ||
108 | \func{void}{OnExit}{\void} | |
109 | ||
110 | Called when the thread exits. The default implementation calls \helpref{wxThread::Join}{wxthreadjoin}. | |
111 | ||
112 | \membersection{wxThread::SetPriority}\label{wxthreadsetpriority} | |
113 | ||
114 | \func{void}{SetPriority}{\param{int}{ priority}} | |
115 | ||
116 | Sets the priority of the thread, between zero and 100. This must be set before the thread is created. | |
117 | ||
118 | The following priorities are already defined: | |
119 | ||
120 | \twocolwidtha{7cm} | |
121 | \begin{twocollist}\itemsep=0pt | |
e14dccff KB |
122 | \twocolitem{{\bf WXTHREAD\_MIN\_PRIORITY}}{0} |
123 | \twocolitem{{\bf WXTHREAD\_DEFAULT\_PRIORITY}}{50} | |
124 | \twocolitem{{\bf WXTHREAD\_MAX\_PRIORITY}}{100} | |
eaaa6a06 JS |
125 | \end{twocollist} |
126 | ||
e14dccff KB |
127 | |
128 | %%% Local Variables: | |
129 | %%% mode: latex | |
130 | %%% TeX-master: "referenc" | |
131 | %%% End: |