diff options
author | megamage <none@none> | 2009-05-13 18:22:21 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-13 18:22:21 -0500 |
commit | 25e5c99dec793dfcc45a41873af1760392ee8844 (patch) | |
tree | f79107e9d93dc351f5b4f7b05924eed793f067d3 /src/trinitycore/Master.cpp | |
parent | 9dd5a1c6d7a6656b8ec71ff33659acd2294633ad (diff) |
[7810] Moved ZThread related code on ACE framework. Author: Ambal
Remove ZThread source code from mangos.
--HG--
branch : trunk
Diffstat (limited to 'src/trinitycore/Master.cpp')
-rw-r--r-- | src/trinitycore/Master.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp index 6a952b936d3..2e2d75d5c3c 100644 --- a/src/trinitycore/Master.cpp +++ b/src/trinitycore/Master.cpp @@ -60,7 +60,7 @@ INSTANTIATE_SINGLETON_1( Master ); volatile uint32 Master::m_masterLoopCounter = 0; -class FreezeDetectorRunnable : public ZThread::Runnable +class FreezeDetectorRunnable : public ACE_Based::Runnable { public: FreezeDetectorRunnable() { _delaytime = 0; } @@ -79,7 +79,7 @@ public: w_lastchange = 0; while(!World::IsStopped()) { - ZThread::Thread::sleep(1000); + ACE_Based::Thread::Sleep(1000); uint32 curtime = getMSTime(); //DEBUG_LOG("anti-freeze: time=%u, counters=[%u; %u]",curtime,Master::m_masterLoopCounter,World::m_worldLoopCounter); @@ -115,7 +115,7 @@ public: } }; -class RARunnable : public ZThread::Runnable +class RARunnable : public ACE_Based::Runnable { public: uint32 numLoops, loopCounter; @@ -181,7 +181,7 @@ public: { while (!World::IsStopped()) { - ZThread::Thread::sleep (static_cast<unsigned long> (socketSelecttime / 1000)); + ACE_Based::Thread::Sleep (static_cast<unsigned long> (socketSelecttime / 1000)); checkping (); } } @@ -237,8 +237,8 @@ int Master::Run() _HookSignals(); ///- Launch WorldRunnable thread - ZThread::Thread t(new WorldRunnable); - t.setPriority ((ZThread::Priority )2); + ACE_Based::Thread t(*new WorldRunnable); + t.setPriority ((ACE_Based::Priority )2); // set server online LoginDatabase.PExecute("UPDATE realmlist SET color = 0, population = 0 WHERE id = '%d'",realmID); @@ -250,10 +250,10 @@ int Master::Run() #endif { ///- Launch CliRunnable thread - ZThread::Thread td1(new CliRunnable); + ACE_Based::Thread td1(*new CliRunnable); } - ZThread::Thread td2(new RARunnable); + ACE_Based::Thread td2(*new RARunnable); ///- Handle affinity for multiple processors and process priority on Windows #ifdef WIN32 @@ -314,8 +314,8 @@ int Master::Run() { FreezeDetectorRunnable *fdr = new FreezeDetectorRunnable(); fdr->SetDelayTime(freeze_delay*1000); - ZThread::Thread t(fdr); - t.setPriority(ZThread::High); + ACE_Based::Thread t(*fdr); + t.setPriority(ACE_Based::High); } ///- Launch the world listener socket |