mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 19:37:04 +00:00
[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:
parent
4e72ead2fb
commit
5f539117a4
8 changed files with 1447 additions and 1322 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10847"
|
||||
#define REVISION_NR "10848"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue