]>
Commit | Line | Data |
---|---|---|
6e6110ee VZ |
1 | \section{\class{wxMutexLocker}}\label{wxmutexlocker} |
2 | ||
3 | This is a small helper class to be used with \helpref{wxMutex}{wxmutex} | |
4 | objects. 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 | |
6 | forget to release a mutex (which, in general, will promptly lead to the serious | |
7 | problems). See \helpref{wxMutex}{wxmutex} for an example of wxMutexLocker | |
8 | usage. | |
9 | ||
10 | \wxheading{Derived from} | |
11 | ||
12 | None. | |
13 | ||
14 | \wxheading{See also} | |
15 | ||
16 | \helpref{wxMutex}{wxmutex}, | |
17 | \helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker} | |
18 | ||
19 | \latexignore{\rtfignore{\wxheading{Members}}} | |
20 | ||
21 | \membersection{wxMutexLocker::wxMutexLocker}\label{wxmutexlockerctor} | |
22 | \func{}{wxMutexLocker}{\param{wxMutex *}{mutex}} | |
23 | ||
24 | Constructs a wxMutexLocker object associated with mutex which must be non NULL | |
25 | and locks it. Call \helpref{IsOk}{wxmutexisok} to check if the mutex was | |
26 | successfully locked. | |
27 | ||
28 | \membersection{wxMutexLocker::\destruct{wxMutexLocker}}\label{wxmutexlockerdtor} | |
29 | \func{}{\destruct{wxMutexLocker}}{\void} | |
30 | ||
31 | Destuctor releases the mutex if it was successfully acquired in the ctor. | |
32 | ||
33 | \membersection{wxMutexLocker::IsOk}\label{wxmutexlockerisok} | |
34 | \constfunc{bool}{IsOk}{\void} | |
35 | ||
36 | Returns TRUE if mutex was acquired in the constructor, FALSE otherwise. |