From bb4da417adac6189c4d999857d43ca7eb858e3c4 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 21 Oct 2009 14:03:49 -0700 Subject: Removing the Sleep(0) call from the OutgoingPacketHandler --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 209c0e0..be6f7ef 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -790,12 +790,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP // client. m_packetSent will be set to true if a packet is sent m_scene.ClientManager.ForEachSync(ClientOutgoingPacketHandler); - // If a packet was sent, only do a minimum length context switch to allow - // other parts of the code to do work. If nothing was sent, sleep for the - // minimum amount of time before a token bucket could get more tokens - if (m_packetSent) - Thread.Sleep(0); - else + // If nothing was sent, sleep for the minimum amount of time before a + // token bucket could get more tokens + if (!m_packetSent) Thread.Sleep((int)TickCountResolution); } catch (Exception ex) -- cgit v1.1