Classes | |
class | wxCondition |
wxCondition variables correspond to pthread conditions or to Win32 event objects. More... | |
class | wxCriticalSectionLocker |
This is a small helper class to be used with wxCriticalSection objects. More... | |
class | wxThreadHelper |
The wxThreadHelper class is a mix-in class that manages a single background thread, either detached or joinable (see wxThread for the differences). More... | |
class | wxCriticalSection |
A critical section object is used for exactly the same purpose as a wxMutex. More... | |
class | wxThread |
A thread is basically a path of execution through a program. More... | |
class | wxSemaphore |
wxSemaphore is a counter limiting the number of threads concurrently accessing a shared resource. More... | |
class | wxMutexLocker |
This is a small helper class to be used with wxMutex objects. More... | |
class | wxMutex |
A mutex object is a synchronization object whose state is set to signaled when it is not owned by any thread, and nonsignaled when it is owned. More... | |
Macros | |
#define | wxCRIT_SECT_DECLARE(cs) |
This macro declares a (static) critical section object named cs if wxUSE_THREADS is 1 and does nothing if it is 0. | |
#define | wxCRIT_SECT_DECLARE_MEMBER(cs) |
This macro declares a critical section object named cs if wxUSE_THREADS is 1 and does nothing if it is 0. | |
#define | wxCRIT_SECT_LOCKER(name, cs) |
This macro creates a wxCriticalSectionLocker named name and associated with the critical section cs if wxUSE_THREADS is 1 and does nothing if it is 0. | |
#define | wxCRITICAL_SECTION(name) |
This macro combines wxCRIT_SECT_DECLARE() and wxCRIT_SECT_LOCKER(): it creates a static critical section object and also the lock object associated with it. | |
#define | wxLEAVE_CRIT_SECT(critical_section) |
This macro is equivalent to critical_section.Leave() if wxUSE_THREADS is 1 and does nothing if it is 0. | |
#define | wxENTER_CRIT_SECT(critical_section) |
This macro is equivalent to critical_section.Enter() if wxUSE_THREADS is 1 and does nothing if it is 0. | |
Functions | |
bool | wxIsMainThread () |
Returns true if this thread is the main one. | |
void | wxMutexGuiEnter () |
This function must be called when any thread other than the main GUI thread wants to get access to the GUI library. | |
void | wxMutexGuiLeave () |
This function is only defined on platforms which support preemptive threads. | |
enum wxCondError |
See wxCondition.
enum wxMutexError |
The possible wxMutex errors.
wxMUTEX_NO_ERROR |
The operation completed successfully. |
wxMUTEX_INVALID |
The mutex hasn't been initialized. |
wxMUTEX_DEAD_LOCK |
The mutex is already locked by the calling thread. |
wxMUTEX_BUSY |
The mutex is already locked by another thread. |
wxMUTEX_UNLOCKED |
An attempt to unlock a mutex which is not locked. |
wxMUTEX_TIMEOUT |
wxMutex::LockTimeout() has timed out. |
wxMUTEX_MISC_ERROR |
Any other error. |
enum wxMutexType |
The possible wxMutex kinds.
wxMUTEX_DEFAULT |
Normal non-recursive mutex: try to always use this one. |
wxMUTEX_RECURSIVE |
Recursive mutex: don't use these ones with wxCondition. |
enum wxSemaError |
See wxSemaphore.
enum wxThreadError |
The possible thread errors.
enum wxThreadKind |
enum wxThreadWait |
The possible thread wait types.
wxTHREAD_WAIT_BLOCK |
No events are processed while waiting. This is the default under all platforms except for wxMSW. |
wxTHREAD_WAIT_YIELD |
Yield for event dispatching while waiting. This flag is dangerous as it exposes the program using it to unexpected reentrancies in the same way as calling wxYield() function does so you are strongly advised to avoid its use and not wait for the thread termination from the main (GUI) thread at all to avoid making your application unresponsive. Also notice that this flag is not portable as it is only implemented in wxMSW and simply ignored under the other platforms. |
wxTHREAD_WAIT_DEFAULT |
Default wait mode for wxThread::Wait() and wxThread::Delete(). For compatibility reasons, the default wait mode is currently wxTHREAD_WAIT_YIELD if WXWIN_COMPATIBILITY_2_8 is defined (and it is by default). However, as mentioned above, you're strongly encouraged to not use wxTHREAD_WAIT_YIELD and pass wxTHREAD_WAIT_BLOCK to wxThread method explicitly. |