1 \section{\class{wxMutexLocker
}}\label{wxmutexlocker
}
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
10 \wxheading{Derived from
}
14 \wxheading{Include files
}
20 \helpref{wxMutex
}{wxmutex
},
\helpref{wxCriticalSectionLocker
}{wxcriticalsectionlocker
}
22 \latexignore{\rtfignore{\wxheading{Members
}}}
24 \membersection{wxMutexLocker::wxMutexLocker
}\label{wxmutexlockerctor
}
26 \func{}{wxMutexLocker
}{\param{wxMutex\&
}{ mutex
}}
28 Constructs a wxMutexLocker object associated with mutex and locks it.
29 Call
\helpref{IsLocked
}{wxmutexlockerisok
} to check if the mutex was
32 \membersection{wxMutexLocker::
\destruct{wxMutexLocker
}}\label{wxmutexlockerdtor
}
34 \func{}{\destruct{wxMutexLocker
}}{\void}
36 Destructor releases the mutex if it was successfully acquired in the ctor.
38 \membersection{wxMutexLocker::IsOk
}\label{wxmutexlockerisok
}
40 \constfunc{bool
}{IsOk
}{\void}
42 Returns TRUE if mutex was acquired in the constructor, FALSE otherwise.