Files
TrinityCore/src/server/game/Maps/MapUpdater.h
Spp c3343638cb Core: Remove lots warnings:
- All "'xxx' will be initialized after 'yyy' when initialized here"
- Some "unused variable"
- Some "enumeration value 'xxx' not handled in switch"

--HG--
branch : trunk
2010-08-21 20:08:47 +02:00

41 lines
710 B
C++

#ifndef _MAP_UPDATER_H_INCLUDED
#define _MAP_UPDATER_H_INCLUDED
#include <ace/Thread_Mutex.h>
#include <ace/Condition_Thread_Mutex.h>
#include "DelayExecutor.h"
class Map;
class MapUpdater
{
public:
MapUpdater();
virtual ~MapUpdater();
friend class MapUpdateRequest;
int schedule_update(Map& map, ACE_UINT32 diff);
int wait();
int activate(size_t num_threads);
int deactivate();
bool activated();
private:
DelayExecutor m_executor;
ACE_Thread_Mutex m_mutex;
ACE_Condition_Thread_Mutex m_condition;
size_t pending_requests;
void update_finished();
};
#endif //_MAP_UPDATER_H_INCLUDED