\section{\class{wxThread}}\label{wxthread}
A thread is basically a path of execution through a program. Threads are also
-sometimes calls {\it light-wight processes}, but the fundamental difference
+sometimes called {\it light-weight processes}, but the fundamental difference
between threads and processes is that memory spaces of different processes are
separated while all threads share the same address space. While it makes it
much easier to share common data between several threads, it also makes much
-easier to shoot oneself in a leg, so careful use of synchronization objects
+easier to shoot oneself in the foot, so careful use of synchronization objects
such as \helpref{mutexes}{wxmutex} and/or \helpref{critical sections}{wxcriticalsection} is recommended.
\wxheading{Derived from}
None.
+\wxheading{Include files}
+
+<wx/thread.h>
+
\wxheading{See also}
-\helpref{wxMutex}{wxmutex}, \helpref{wxCondition}{wxcondition}, \helpref{wxCriticalSection}{wxarraywxcriticalsection}
+\helpref{wxMutex}{wxmutex}, \helpref{wxCondition}{wxcondition}, \helpref{wxCriticalSection}{wxcriticalsection}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxThread::Delete}\label{wxthreaddelete}
-\func{\void}{Delete}{\void}
+\func{void}{Delete}{\void}
This function should be called to terminate this thread. Unlike \helpref{Kill}{wxthreadkill}, it
gives the target thread the time to terminate gracefully. Because of this, however, this function
it must be called if \helpref{Create}{wxthreadcreate} or \helpref{Run}{wxthreadrun} fail to free
the memory occupied by the thread object.
+\membersection{wxThread::Entry}\label{wxthreadentry}
+
+\func{virtual void *}{Entry}{\void}
+
+This is the entry point of the thread. This function is pure virtual and must
+be implemented by any derived class. The thread execution will start here.
+
+The returned value is the thread exit code but is currently ignored in
+wxWindows implementation (this will change in near future).
+
\membersection{wxThread::GetID}\label{wxthreadgetid}
\constfunc{unsigned long}{GetID}{\void}
Called when the thread exits. This function is called in the context of the thread
associated with the wxThread object, not in the context of the main thread.
+\membersection{wxThread::Run}\label{wxthreadrun}
+
+\func{wxThreadError}{Run}{\void}
+
+Runs the thread.
+
\membersection{wxThread::SetPriority}\label{wxthreadsetpriority}
\func{void}{SetPriority}{\param{int}{ priority}}
Give the rest of the thread time slice to the system allowing the other threads to run.
See also \helpref{Sleep()}{wxthreadsleep}.
+