*/
enum wxThreadKind
{
- wxTHREAD_DETACHED, /** Detached thread */
- wxTHREAD_JOINABLE /** Joinable thread */
+ /** Detached thread */
+ wxTHREAD_DETACHED,
+
+ /** Joinable thread */
+ wxTHREAD_JOINABLE
};
/**
*/
enum wxThreadError
{
- wxTHREAD_NO_ERROR = 0, /** No error */
- wxTHREAD_NO_RESOURCE, /** No resource left to create a new thread */
- wxTHREAD_RUNNING, /** The thread is already running */
- wxTHREAD_NOT_RUNNING, /** The thread isn't running */
- wxTHREAD_KILLED, /** Thread we waited for had to be killed */
- wxTHREAD_MISC_ERROR /** Some other error */
+ /** No error */
+ wxTHREAD_NO_ERROR = 0,
+
+ /** No resource left to create a new thread. */
+ wxTHREAD_NO_RESOURCE,
+
+ /** The thread is already running. */
+ wxTHREAD_RUNNING,
+
+ /** The thread isn't running. */
+ wxTHREAD_NOT_RUNNING,
+
+ /** Thread we waited for had to be killed. */
+ wxTHREAD_KILLED,
+
+ /** Some other error */
+ wxTHREAD_MISC_ERROR
};
/**
*/
enum wxMutexType
{
- wxMUTEX_DEFAULT, /** Normal mutex: try to always use this one. Recursive under Windows. */
+ /** Normal non-recursive mutex: try to always use this one. */
+ wxMUTEX_DEFAULT,
- wxMUTEX_RECURSIVE /** Recursive mutex: don't use these ones with wxCondition. */
+ /** Recursive mutex: don't use these ones with wxCondition. */
+ wxMUTEX_RECURSIVE
};
*/
enum wxMutexError
{
- wxMUTEX_NO_ERROR = 0, /** operation completed successfully */
- wxMUTEX_INVALID, /** mutex hasn't been initialized */
- wxMUTEX_DEAD_LOCK, /** mutex is already locked by the calling thread */
- wxMUTEX_BUSY, /** mutex is already locked by another thread */
- wxMUTEX_UNLOCKED, /** attempt to unlock a mutex which is not locked */
- wxMUTEX_TIMEOUT, /** LockTimeout() has timed out */
- wxMUTEX_MISC_ERROR /** any other error */
+ /** The operation completed successfully. */
+ wxMUTEX_NO_ERROR = 0,
+
+ /** The mutex hasn't been initialized. */
+ wxMUTEX_INVALID,
+
+ /** The mutex is already locked by the calling thread. */
+ wxMUTEX_DEAD_LOCK,
+
+ /** The mutex is already locked by another thread. */
+ wxMUTEX_BUSY,
+
+ /** An attempt to unlock a mutex which is not locked. */
+ wxMUTEX_UNLOCKED,
+
+ /** wxMutex::LockTimeout() has timed out. */
+ wxMUTEX_TIMEOUT,
+
+ /** Any other error */
+ wxMUTEX_MISC_ERROR
};
had already locked before (instead of dead locking the entire process in this
situation by starting to wait on a mutex which will never be released while the
thread is waiting) but using them is not recommended under Unix and they are
- @b not recursive there by default. The reason for this is that recursive
+ @b not recursive by default. The reason for this is that recursive
mutexes are not supported by all Unix flavours and, worse, they cannot be used
- with wxCondition. On the other hand, Win32 mutexes are always recursive.
+ with wxCondition.
For example, when several threads use the data stored in the linked list,
modifications to the list should only be allowed to one thread at a time