📄 _synchop.h
字号:
/************************************
REVISION LOG ENTRY
Revision By: Alex Turc ( alex_turc@hotmail.com )
Revised on 6/9/00 12:15:31 AM
Comments: Synchronization operations
************************************/
#ifndef ___synchop_h__
#define ___synchop_h__
namespace extension
{
/*
Generic lock. Template argument must have Lock/Unlock methods
*/
template< class T >
class generic_lock
{
public:
// Locks the object
generic_lock( T& t ) :
m_refT( t )
{
m_refT.lock();
}
// Unlocks the object
virtual ~generic_lock()
{
m_refT.unlock();
}
private:
T& m_refT;
// Disable some operations
generic_lock( const T& );
generic_lock& operator=( const T& );
};
} // Namespace extension
#endif // ___synchop_h__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -