Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 18, 2009, 5:28:24 PM (15 years ago)
Author:
scheusso
Message:

reverted some changes, which made the network multithreaded, in order to make a 0.0.3 tag

Location:
code/branches/netp6/src/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp6/src/network/GamestateManager.cc

    r3302 r3303  
    4343#include <cassert>
    4444#include <queue>
    45 #include <boost/thread/mutex.hpp>
     45// #include <boost/thread/mutex.hpp>
    4646
    4747#include "util/Debug.h"
     
    6060  {
    6161    trafficControl_ = new TrafficControl();
    62     threadMutex_ = new boost::mutex();
    63     threadPool_ = new ThreadPool();
     62//     threadMutex_ = new boost::mutex();
     63//     threadPool_ = new ThreadPool();
    6464  }
    6565
     
    7878    }
    7979    delete this->trafficControl_;
    80     delete this->threadMutex_;
    81     delete this->threadPool_;
     80//     delete this->threadMutex_;
     81//     delete this->threadPool_;
    8282  }
    8383
     
    158158     
    159159      clientGamestates.push(0);
    160 //       finishGamestate( cid, clientGamestates.back(), client, reference );
     160      finishGamestate( cid, &clientGamestates.back(), client, reference );
    161161      //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 );
    165165//       (*static_cast<Executor*>(executor))();
    166       this->threadPool_->passFunction( executor, true );
     166//       this->threadPool_->passFunction( executor, true );
    167167//       (*functor)( cid, &(clientGamestates.back()), client, reference );
    168168     
     
    170170    }
    171171   
    172     threadPool_->synchronise();
     172//     threadPool_->synchronise();
    173173   
    174174    while( !clientGamestates.empty() )
     
    191191//     packet::Gamestate *gs = new packet::Gamestate();
    192192//     gs->collectData( id_, 0x1 );
    193     this->threadMutex_->lock();
     193//     this->threadMutex_->lock();
    194194    gamestateMap_[clientID][gamestate->getID()]=gs;
    195     this->threadMutex_->unlock();
     195//     this->threadMutex_->unlock();
    196196   
    197197    if(base)
  • code/branches/netp6/src/network/GamestateManager.h

    r3240 r3303  
    9090    TrafficControl *trafficControl_;
    9191    unsigned int id_;
    92     boost::mutex* threadMutex_;
    93     ThreadPool*   threadPool_;
     92//     boost::mutex* threadMutex_;
     93    ThreadPool*   /*thread*/Pool_;
    9494  };
    9595
Note: See TracChangeset for help on using the changeset viewer.