Changeset 3303 for code/branches/netp6/src/network
- Timestamp:
- Jul 18, 2009, 5:28:24 PM (15 years ago)
- Location:
- code/branches/netp6/src/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp6/src/network/GamestateManager.cc
r3302 r3303 43 43 #include <cassert> 44 44 #include <queue> 45 #include <boost/thread/mutex.hpp>45 // #include <boost/thread/mutex.hpp> 46 46 47 47 #include "util/Debug.h" … … 60 60 { 61 61 trafficControl_ = new TrafficControl(); 62 threadMutex_ = new boost::mutex();63 threadPool_ = new ThreadPool();62 // threadMutex_ = new boost::mutex(); 63 // threadPool_ = new ThreadPool(); 64 64 } 65 65 … … 78 78 } 79 79 delete this->trafficControl_; 80 delete this->threadMutex_;81 delete this->threadPool_;80 // delete this->threadMutex_; 81 // delete this->threadPool_; 82 82 } 83 83 … … 158 158 159 159 clientGamestates.push(0); 160 // finishGamestate( cid,clientGamestates.back(), client, reference );160 finishGamestate( cid, &clientGamestates.back(), client, reference ); 161 161 //FunctorMember<GamestateManager>* functor = 162 ExecutorMember<GamestateManager>* executor = createExecutor( createFunctor(&GamestateManager::finishGamestate) );163 executor->setObject(this);164 executor->setDefaultValues( cid, &clientGamestates.back(), client, reference );162 // ExecutorMember<GamestateManager>* executor = createExecutor( createFunctor(&GamestateManager::finishGamestate) ); 163 // executor->setObject(this); 164 // executor->setDefaultValues( cid, &clientGamestates.back(), client, reference ); 165 165 // (*static_cast<Executor*>(executor))(); 166 this->threadPool_->passFunction( executor, true );166 // this->threadPool_->passFunction( executor, true ); 167 167 // (*functor)( cid, &(clientGamestates.back()), client, reference ); 168 168 … … 170 170 } 171 171 172 threadPool_->synchronise();172 // threadPool_->synchronise(); 173 173 174 174 while( !clientGamestates.empty() ) … … 191 191 // packet::Gamestate *gs = new packet::Gamestate(); 192 192 // gs->collectData( id_, 0x1 ); 193 this->threadMutex_->lock();193 // this->threadMutex_->lock(); 194 194 gamestateMap_[clientID][gamestate->getID()]=gs; 195 this->threadMutex_->unlock();195 // this->threadMutex_->unlock(); 196 196 197 197 if(base) -
code/branches/netp6/src/network/GamestateManager.h
r3240 r3303 90 90 TrafficControl *trafficControl_; 91 91 unsigned int id_; 92 boost::mutex* threadMutex_;93 ThreadPool* threadPool_;92 // boost::mutex* threadMutex_; 93 ThreadPool* /*thread*/Pool_; 94 94 }; 95 95
Note: See TracChangeset
for help on using the changeset viewer.