]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/mutexlck.tex
typo fix
[wxWidgets.git] / docs / latex / wx / mutexlck.tex
... / ...
CommitLineData
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 serious
7problems). See \helpref{wxMutex}{wxmutex} for an example of wxMutexLocker
8usage.
9
10\wxheading{Derived from}
11
12None.
13
14\wxheading{Include files}
15
16<wx/thread.h>
17
18\wxheading{Library}
19
20\helpref{wxBase}{librarieslist}
21
22\wxheading{See also}
23
24\helpref{wxMutex}{wxmutex}, \helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker}
25
26\latexignore{\rtfignore{\wxheading{Members}}}
27
28\membersection{wxMutexLocker::wxMutexLocker}\label{wxmutexlockerctor}
29
30\func{}{wxMutexLocker}{\param{wxMutex\&}{ mutex}}
31
32Constructs a wxMutexLocker object associated with mutex and locks it.
33Call \helpref{IsLocked}{wxmutexlockerisok} to check if the mutex was
34successfully locked.
35
36\membersection{wxMutexLocker::\destruct{wxMutexLocker}}\label{wxmutexlockerdtor}
37
38\func{}{\destruct{wxMutexLocker}}{\void}
39
40Destructor releases the mutex if it was successfully acquired in the ctor.
41
42\membersection{wxMutexLocker::IsOk}\label{wxmutexlockerisok}
43
44\constfunc{bool}{IsOk}{\void}
45
46Returns true if mutex was acquired in the constructor, false otherwise.
47