aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-27 14:16:01 -0700
committerJohn Hurliman2009-10-27 14:16:01 -0700
commitf89c2cac0fd3e9e1ae66552bbc2c3cc4bb17aaed (patch)
treeff8e7f0ee8892e8c643e2ede4c794173f6dc528b /OpenSim/Region
parentUpdating prebuild.xml to reflect the removal of DotNetEngine (diff)
downloadopensim-SC_OLD-f89c2cac0fd3e9e1ae66552bbc2c3cc4bb17aaed.zip
opensim-SC_OLD-f89c2cac0fd3e9e1ae66552bbc2c3cc4bb17aaed.tar.gz
opensim-SC_OLD-f89c2cac0fd3e9e1ae66552bbc2c3cc4bb17aaed.tar.bz2
opensim-SC_OLD-f89c2cac0fd3e9e1ae66552bbc2c3cc4bb17aaed.tar.xz
Experimental test to rate limit the incoming packet handler and try to always leave a worker thread available for other tasks
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index e3233da..74d3262 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -801,6 +801,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
801 { 801 {
802 IncomingPacket incomingPacket = null; 802 IncomingPacket incomingPacket = null;
803 803
804 // HACK: This is a test to try and rate limit packet handling on Mono.
805 // If it works, a more elegant solution can be devised
806 if (Util.FireAndForgetCount() < 2)
807 {
808 //m_log.Debug("[LLUDPSERVER]: Incoming packet handler is sleeping");
809 Thread.Sleep(30);
810 }
811
804 if (packetInbox.Dequeue(100, ref incomingPacket)) 812 if (packetInbox.Dequeue(100, ref incomingPacket))
805 Util.FireAndForget(ProcessInPacket, incomingPacket); 813 Util.FireAndForget(ProcessInPacket, incomingPacket);
806 } 814 }