Files
Client/Server/RylServerProject/BaseLibrary/Pattern/CommandQueue.h
LGram16 dd97ddec92 Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:17:20 +09:00

50 lines
792 B
C++

#ifndef _SYNCRONIZED_COMMAND_QUEUE_
#define _SYNCRONIZED_COMMAND_QUEUE_
#include <winsock2.h>
#include <windows.h>
#include <Thread/Lock.h>
#include <Thread/Thread.h>
#include <list>
// 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<CCommand*> CommandList;
HANDLE m_hHandles[MaxIndex];
MsgQueueLock m_Lock;
CACHE_PAD(MsgQueueLockPad, sizeof(CCSLock));
CommandList m_CommandList;
};
#endif