⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crtslock.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
\section{\class{wxCriticalSectionLocker}}\label{wxcriticalsectionlocker}This is a small helper class to be used with \helpref{wxCriticalSection}{wxcriticalsection} objects. A wxCriticalSectionLocker enters the critical section in theconstructor and leaves it in the destructor making it much more difficult toforget to leave a critical section (which, in general, will lead to seriousand difficult to debug problems).Example of using it:\begin{verbatim}void Set Foo(){    // gs_critSect is some (global) critical section guarding access to the    // object "foo"    wxCriticalSectionLocker locker(gs_critSect);    if ( ... )    {        // do something        ...        return;    }    // do something else    ...    return;}\end{verbatim}Without wxCriticalSectionLocker, you would need to remember to manually leavethe critical section before each {\tt return}.\wxheading{Derived from}None.\wxheading{Include files}<wx/thread.h>\wxheading{See also}\helpref{wxCriticalSection}{wxcriticalsection}, \helpref{wxMutexLocker}{wxmutexlocker}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxCriticalSectionLocker::wxCriticalSectionLocker}\label{wxcriticalsectionlockerctor}\func{}{wxCriticalSectionLocker}{\param{wxCriticalSection\& }{criticalsection}}Constructs a wxCriticalSectionLocker object associated with given{\it criticalsection} and enters it.\membersection{wxCriticalSectionLocker::\destruct{wxCriticalSectionLocker}}\label{wxcriticalsectionlockerdtor}\func{}{\destruct{wxCriticalSectionLocker}}{\void}Destructor leaves the critical section.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -