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 8086a39210659c44d52fb463f5a39f047aa45685)
This commit is contained in:
Shauren authored and Aokromes committed 2016-05-05 03:34:42 +02:00
1 parent 07ba043eae
commit 9d4e537a62
2 files changed
+13 -12

No files matched your search

+8
View File
@@ -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)
{