[10848] New system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Thank you for all your feedback!

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
Ambal 2010-12-09 20:20:58 +02:00
parent 4e72ead2fb
commit 5f539117a4
8 changed files with 1447 additions and 1322 deletions

View file

@ -82,6 +82,22 @@ namespace ACE_Based
return true;
}
template<class Checker>
bool next(T& result, Checker& check)
{
ACE_Guard<LockType> g(this->_lock);
if (_queue.empty())
return false;
result = _queue.front();
if(!check.Process(result))
return false;
_queue.pop_front();
return true;
}
//! Peeks at the top of the queue. Remember to unlock after use.
T& peek()
{