X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/28d9589a71801298e94803f67b44b86e81e3ef44..d45d30c8682f858321600e2958167d7ef54ebeb5:/docs/latex/wx/thread.tex diff --git a/docs/latex/wx/thread.tex b/docs/latex/wx/thread.tex index b980ab9ac6..89bc18dd24 100644 --- a/docs/latex/wx/thread.tex +++ b/docs/latex/wx/thread.tex @@ -1,20 +1,24 @@ \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} + + + \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}}} @@ -54,7 +58,7 @@ One of: \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 @@ -66,6 +70,16 @@ Delete() may be called for thread in any state: running, paused or even not yet 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} @@ -128,6 +142,12 @@ may become inconsistent. Use \helpref{Delete()}{wxthreaddelete} instead. 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}} @@ -168,3 +188,4 @@ is undefined. Give the rest of the thread time slice to the system allowing the other threads to run. See also \helpref{Sleep()}{wxthreadsleep}. +