Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 15, 2008, 11:42:50 AM (16 years ago)
Author:
scheusso
Message:

adapted boost threads in clientconnection
added trap to runscript (xset r, autorepeat)
had to change assff back to assf3 due to some network issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/merge/src/network/ClientConnection.cc

    r1264 r1279  
    4242#include <iostream>
    4343// boost.thread library for multithreading support
    44 #include <boost/thread/thread.hpp>
    4544#include <boost/bind.hpp>
    4645
     
    5049namespace network
    5150{
    52   static boost::thread_group network_threads;
     51  //static boost::thread_group network_threads;
    5352
    5453  ClientConnection::ClientConnection(int port, std::string address) {
     
    9695
    9796  bool ClientConnection::createConnection() {
    98     network_threads.create_thread(boost::bind(boost::mem_fn(&ClientConnection::receiverThread), this));
     97    receiverThread_ = new boost::thread(boost::bind(&ClientConnection::receiverThread, this));
     98    //network_threads.create_thread(boost::bind(boost::mem_fn(&ClientConnection::receiverThread), this));
    9999    // wait 10 seconds for the connection to be established
    100100    return waitEstablished(10000);
     
    103103  bool ClientConnection::closeConnection() {
    104104    quit=true;
    105     network_threads.join_all();
     105    //network_threads.join_all();
     106    receiverThread_->join();
    106107    established=false;
    107108    return true;
     
    179180        continue;
    180181      }
     182      //receiverThread_->yield();
    181183    }
    182184    // now disconnect
Note: See TracChangeset for help on using the changeset viewer.