Improved threading performance by reducing thread-hopping in queue locks (cs unlocked before event set)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@341 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -714,9 +714,11 @@ void cServer::cNotifyWriteThread::Execute(void)
|
||||
|
||||
void cServer::cNotifyWriteThread::NotifyClientWrite(const cClientHandle * a_Client)
|
||||
{
|
||||
cCSLock Lock(m_CS);
|
||||
m_Clients.remove(const_cast<cClientHandle *>(a_Client)); // Put it there only once
|
||||
m_Clients.push_back(const_cast<cClientHandle *>(a_Client));
|
||||
{
|
||||
cCSLock Lock(m_CS);
|
||||
m_Clients.remove(const_cast<cClientHandle *>(a_Client)); // Put it there only once
|
||||
m_Clients.push_back(const_cast<cClientHandle *>(a_Client));
|
||||
}
|
||||
m_Event.Set();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user