#ifndef _SYNCRONIZED_COMMAND_QUEUE_ #define _SYNCRONIZED_COMMAND_QUEUE_ #include #include #include #include #include // forward decl. class CCommand; // ¸Þ½ÃÁö Å¥ ½º·¹µå. class CCommandQueueThread : public CThread { public: CCommandQueueThread(long nMaxQueueSize = LONG_MAX); virtual ~CCommandQueueThread(); bool Add(CCommand* lpCommand); bool IsValid(); protected: enum Const { StopperIndex, SemaphoreIndex, MaxIndex }; private: virtual unsigned int Run(); virtual BOOL End(); typedef CCSLock MsgQueueLock; typedef std::list CommandList; HANDLE m_hHandles[MaxIndex]; MsgQueueLock m_Lock; CACHE_PAD(MsgQueueLockPad, sizeof(CCSLock)); CommandList m_CommandList; }; #endif