diff options
author | UbitUmarov | 2014-08-10 16:36:20 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-10 16:36:20 +0100 |
commit | c0378d54304b2b6bde4a3c24eb137f664716ae81 (patch) | |
tree | 785517b360c5fd859d614ccf57275d42b389ce56 /OpenSim | |
parent | OutgoingPacketHandler can not be paced by hits on SendPacket() (diff) | |
download | opensim-SC_OLD-c0378d54304b2b6bde4a3c24eb137f664716ae81.zip opensim-SC_OLD-c0378d54304b2b6bde4a3c24eb137f664716ae81.tar.gz opensim-SC_OLD-c0378d54304b2b6bde4a3c24eb137f664716ae81.tar.bz2 opensim-SC_OLD-c0378d54304b2b6bde4a3c24eb137f664716ae81.tar.xz |
actually let delay match throttles as original design
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index e317fc0..0bb53c4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -301,8 +301,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
301 | /// <remarks> | 301 | /// <remarks> |
302 | /// This allows the outbound loop to only operate when there is data to send rather than continuously polling. | 302 | /// This allows the outbound loop to only operate when there is data to send rather than continuously polling. |
303 | /// Some data is sent immediately and not queued. That data would not trigger this event. | 303 | /// Some data is sent immediately and not queued. That data would not trigger this event. |
304 | /// WRONG use. May be usefull in future revision | ||
304 | /// </remarks> | 305 | /// </remarks> |
305 | private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); | 306 | // private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); |
306 | 307 | ||
307 | private Pool<IncomingPacket> m_incomingPacketPool; | 308 | private Pool<IncomingPacket> m_incomingPacketPool; |
308 | 309 | ||
@@ -990,8 +991,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
990 | 991 | ||
991 | PacketPool.Instance.ReturnPacket(packet); | 992 | PacketPool.Instance.ReturnPacket(packet); |
992 | 993 | ||
993 | if (packetQueued) | 994 | /// WRONG use. May be usefull in future revision |
994 | m_dataPresentEvent.Set(); | 995 | // if (packetQueued) |
996 | // m_dataPresentEvent.Set(); | ||
995 | } | 997 | } |
996 | 998 | ||
997 | /// <summary> | 999 | /// <summary> |
@@ -2153,14 +2155,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2153 | // token bucket could get more tokens | 2155 | // token bucket could get more tokens |
2154 | 2156 | ||
2155 | if (!m_packetSent) | 2157 | if (!m_packetSent) |
2156 | // Thread.Sleep((int)TickCountResolution); | 2158 | Thread.Sleep((int)TickCountResolution); |
2157 | Thread.Sleep(20); // be independent of TickCountResolution | 2159 | |
2158 | // | 2160 | // .... wrong core code removed |
2159 | // Instead, now wait for data present to be explicitly signalled. Evidence so far is that with | 2161 | |
2160 | // modern mono it reduces CPU base load since there is no more continuous polling. | ||
2161 | // this misses heavy load cases | ||
2162 | // if (!m_packetSent) | ||
2163 | // m_dataPresentEvent.WaitOne(100); | ||
2164 | 2162 | ||
2165 | Watchdog.UpdateThread(); | 2163 | Watchdog.UpdateThread(); |
2166 | } | 2164 | } |