6e6110ee81
wxCriticalSectionLocker 2. New overviews: Threads overview, Container classes overview 3. A modest update of wxList/wxNode docs to bring them up to date with the new classes (array.tex is simply empty for the moment) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
37 lines
1.3 KiB
TeX
37 lines
1.3 KiB
TeX
\section{\class{wxMutexLocker}}\label{wxmutexlocker}
|
|
|
|
This is a small helper class to be used with \helpref{wxMutex}{wxmutex}
|
|
objects. A wxMutexLocker acquires a mutex lock in the constructor and releases
|
|
(or unlocks) the mutex in the destructor making it much more difficult to
|
|
forget to release a mutex (which, in general, will promptly lead to the serious
|
|
problems). See \helpref{wxMutex}{wxmutex} for an example of wxMutexLocker
|
|
usage.
|
|
|
|
\wxheading{Derived from}
|
|
|
|
None.
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{wxMutex}{wxmutex},
|
|
\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker}
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
\membersection{wxMutexLocker::wxMutexLocker}\label{wxmutexlockerctor}
|
|
\func{}{wxMutexLocker}{\param{wxMutex *}{mutex}}
|
|
|
|
Constructs a wxMutexLocker object associated with mutex which must be non NULL
|
|
and locks it. Call \helpref{IsOk}{wxmutexisok} to check if the mutex was
|
|
successfully locked.
|
|
|
|
\membersection{wxMutexLocker::\destruct{wxMutexLocker}}\label{wxmutexlockerdtor}
|
|
\func{}{\destruct{wxMutexLocker}}{\void}
|
|
|
|
Destuctor releases the mutex if it was successfully acquired in the ctor.
|
|
|
|
\membersection{wxMutexLocker::IsOk}\label{wxmutexlockerisok}
|
|
\constfunc{bool}{IsOk}{\void}
|
|
|
|
Returns TRUE if mutex was acquired in the constructor, FALSE otherwise.
|