OutgoingPacketHandler can not be paced by hits on SendPacket()
parent
a363ed484e
commit
ebc18a80bf
|
@ -1418,6 +1418,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
queue.Enqueue(buffer);
|
queue.Enqueue(buffer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (packet.Type == PacketType.CompleteAgentMovement)
|
else if (packet.Type == PacketType.CompleteAgentMovement)
|
||||||
{
|
{
|
||||||
// Send ack straight away to let the viewer know that we got it.
|
// Send ack straight away to let the viewer know that we got it.
|
||||||
|
@ -2150,13 +2151,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
// If nothing was sent, sleep for the minimum amount of time before a
|
// If nothing was sent, sleep for the minimum amount of time before a
|
||||||
// token bucket could get more tokens
|
// token bucket could get more tokens
|
||||||
//if (!m_packetSent)
|
|
||||||
// Thread.Sleep((int)TickCountResolution);
|
if (!m_packetSent)
|
||||||
|
// Thread.Sleep((int)TickCountResolution);
|
||||||
|
Thread.Sleep(20); // be independent of TickCountResolution
|
||||||
//
|
//
|
||||||
// Instead, now wait for data present to be explicitly signalled. Evidence so far is that with
|
// Instead, now wait for data present to be explicitly signalled. Evidence so far is that with
|
||||||
// modern mono it reduces CPU base load since there is no more continuous polling.
|
// modern mono it reduces CPU base load since there is no more continuous polling.
|
||||||
if (!m_packetSent)
|
// this misses heavy load cases
|
||||||
m_dataPresentEvent.WaitOne(100);
|
// if (!m_packetSent)
|
||||||
|
// m_dataPresentEvent.WaitOne(100);
|
||||||
|
|
||||||
Watchdog.UpdateThread();
|
Watchdog.UpdateThread();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue