1 \section{\class{wxMutex
}}\label{wxmutex
}
3 A wxMutex controls mutual exclusion, to prevent two or more threads accessing
4 the same piece of code.
6 \wxheading{Derived from
}
12 \helpref{wxThread
}{wxthread
},
\helpref{wxCondition
}{wxcondition
}
14 \latexignore{\rtfignore{\wxheading{Members
}}}
16 \membersection{wxMutex::wxMutex
}\label{wxmutexconstr
}
18 \func{}{wxMutex
}{\void}
22 \membersection{wxMutex::
\destruct{wxMutex
}}
24 \func{}{\destruct{wxMutex
}}{\void}
26 Destroys the wxMutex object.
28 \membersection{wxMutex::IsLocked
}\label{wxmutexislocked
}
30 \constfunc{bool
}{IsLocked
}{\void}
32 Returns TRUE if the mutex is locked, FALSE otherwise.
34 \membersection{wxMutex::Lock
}\label{wxmutexlock
}
36 \func{wxMutexError
}{Lock
}{\void}
38 Locks the mutex object.
40 \wxheading{Return value
}
45 \begin{twocollist
}\itemsep=
0pt
46 \twocolitem{{\bf MUTEX
\_NO\_ERROR}}{There was no error.
}
47 \twocolitem{{\bf MUTEX
\_DEAD\_LOCK}}{A deadlock situation was detected.
}
48 \twocolitem{{\bf MUTEX
\_BUSY}}{The mutex is already locked by another thread.
}
51 \membersection{wxMutex::TryLock
}\label{wxmutextrylock
}
53 \func{wxMutexError
}{TryLock
}{\void}
55 Tries to lock the mutex object. If it can't, returns immediately with an error.
57 \wxheading{Return value
}
62 \begin{twocollist
}\itemsep=
0pt
63 \twocolitem{{\bf MUTEX
\_NO\_ERROR}}{There was no error.
}
64 \twocolitem{{\bf MUTEX
\_DEAD\_LOCK}}{A deadlock situation was detected.
}
65 \twocolitem{{\bf MUTEX
\_BUSY}}{The mutex is already locked by another thread.
}
68 \membersection{wxMutex::Unlock
}\label{wxmutexunlock
}
70 \func{wxMutexError
}{Unlock
}{\void}
72 Unlocks the mutex object.
74 \wxheading{Return value
}
79 \begin{twocollist
}\itemsep=
0pt
80 \twocolitem{{\bf MUTEX
\_NO\_ERROR}}{There was no error.
}
81 \twocolitem{{\bf MUTEX
\_DEAD\_LOCK}}{A deadlock situation was detected.
}
82 \twocolitem{{\bf MUTEX
\_BUSY}}{The mutex is already locked by another thread.
}
83 \twocolitem{{\bf MUTEX
\_UNLOCKED}}{The calling thread tries to unlock an unlocked mutex.
}