]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/mutexlck.tex
* Stream doc.
[wxWidgets.git] / docs / latex / wx / mutexlck.tex
CommitLineData
6e6110ee
VZ
1\section{\class{wxMutexLocker}}\label{wxmutexlocker}
2
3This is a small helper class to be used with \helpref{wxMutex}{wxmutex}
4objects. A wxMutexLocker acquires a mutex lock in the constructor and releases
5(or unlocks) the mutex in the destructor making it much more difficult to
6forget to release a mutex (which, in general, will promptly lead to the serious
7problems). See \helpref{wxMutex}{wxmutex} for an example of wxMutexLocker
8usage.
9
10\wxheading{Derived from}
11
12None.
13
14\wxheading{See also}
15
2432b92d 16\helpref{wxMutex}{wxmutex}, \helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker}
6e6110ee
VZ
17
18\latexignore{\rtfignore{\wxheading{Members}}}
19
20\membersection{wxMutexLocker::wxMutexLocker}\label{wxmutexlockerctor}
2432b92d 21
6e6110ee
VZ
22\func{}{wxMutexLocker}{\param{wxMutex *}{mutex}}
23
24Constructs a wxMutexLocker object associated with mutex which must be non NULL
2432b92d 25and locks it. Call \helpref{IsLocked}{wxmutexlockerisok} to check if the mutex was
6e6110ee
VZ
26successfully locked.
27
28\membersection{wxMutexLocker::\destruct{wxMutexLocker}}\label{wxmutexlockerdtor}
2432b92d 29
6e6110ee
VZ
30\func{}{\destruct{wxMutexLocker}}{\void}
31
32Destuctor releases the mutex if it was successfully acquired in the ctor.
33
34\membersection{wxMutexLocker::IsOk}\label{wxmutexlockerisok}
2432b92d 35
6e6110ee
VZ
36\constfunc{bool}{IsOk}{\void}
37
38Returns TRUE if mutex was acquired in the constructor, FALSE otherwise.
2432b92d 39