Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7900 for code/branches


Ignore:
Timestamp:
Feb 15, 2011, 2:34:09 PM (14 years ago)
Author:
scheusso
Message:

castrating Thread.cc for windows because of high cpu usage

Location:
code/branches/network6/src/libraries
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network6/src/libraries/core/Thread.cc

    r7284 r7900  
    2626 *
    2727 */
     28
     29#if defined(ORXONOX_PLATFORM_WINDOWS)
     30  #include "ThreadWin.cc"
     31#elif defined(ORXONOX_PLATFORM_UNIX)
     32
    2833
    2934#include "Thread.h"
     
    9196        while( !stopThread )
    9297        {
    93             //this->executorMutex_->lock();
     98            this->executorMutex_->lock();
    9499            ExecutorPtr executor = this->executor_;
    95             //this->executorMutex_->unlock();
     100            this->executorMutex_->unlock();
    96101            if( executor )
    97102            {
     
    108113                this->workerThread_->yield();
    109114            }
    110             //this->stopThreadMutex_->lock();
     115            this->stopThreadMutex_->lock();
    111116            stopThread = this->stopThread_;
    112             //this->stopThreadMutex_->unlock();
     117            this->stopThreadMutex_->unlock();
    113118        }
    114119    }
     
    127132    }
    128133}
     134
     135#endif
  • code/branches/network6/src/libraries/network/Connection.cc

    r7898 r7900  
    135135     
    136136//       this->overallMutex_->unlock();
    137       msleep(10);
     137      msleep(1);
    138138//       this->overallMutex_->lock();
    139139     
Note: See TracChangeset for help on using the changeset viewer.