mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/PacketIO: Requeue packets handled with STATUS_LOGGEDIN received before player is fully loaded in one step after packet processing loop - reduces used locks from 3 per packet to 1 per packet
(cherry picked from commit 8086a39210)
This commit is contained in:
@@ -57,6 +57,14 @@ public:
|
||||
unlock();
|
||||
}
|
||||
|
||||
//! Adds items back to front of the queue
|
||||
template<class Iterator>
|
||||
void readd(Iterator begin, Iterator end)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_lock);
|
||||
_queue.insert(_queue.begin(), begin, end);
|
||||
}
|
||||
|
||||
//! Gets the next result in the queue, if any.
|
||||
bool next(T& result)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user