aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/PacketQueue.cs
diff options
context:
space:
mode:
authorSean Dague2007-12-11 21:47:18 +0000
committerSean Dague2007-12-11 21:47:18 +0000
commit2e38e534d90463fbf9c8c0cfd8f7620eac2fd22b (patch)
treea13fe0086282c7a3f5b82848583737241335bf76 /OpenSim/Region/ClientStack/PacketQueue.cs
parent* Added some locking to help race conditions in the neighbors lists (diff)
downloadopensim-SC_OLD-2e38e534d90463fbf9c8c0cfd8f7620eac2fd22b.zip
opensim-SC_OLD-2e38e534d90463fbf9c8c0cfd8f7620eac2fd22b.tar.gz
opensim-SC_OLD-2e38e534d90463fbf9c8c0cfd8f7620eac2fd22b.tar.bz2
opensim-SC_OLD-2e38e534d90463fbf9c8c0cfd8f7620eac2fd22b.tar.xz
consolidate client view exit paths, this seems to
cause a different synchronization issue in other shutdown routines, though I'm not sure why
Diffstat (limited to 'OpenSim/Region/ClientStack/PacketQueue.cs')
-rw-r--r--OpenSim/Region/ClientStack/PacketQueue.cs17
1 files changed, 5 insertions, 12 deletions
diff --git a/OpenSim/Region/ClientStack/PacketQueue.cs b/OpenSim/Region/ClientStack/PacketQueue.cs
index 747ef18..b1a649c 100644
--- a/OpenSim/Region/ClientStack/PacketQueue.cs
+++ b/OpenSim/Region/ClientStack/PacketQueue.cs
@@ -44,6 +44,8 @@ namespace OpenSim.Region.ClientStack
44{ 44{
45 public class PacketQueue 45 public class PacketQueue
46 { 46 {
47 private bool m_enabled = true;
48
47 private BlockingQueue<QueItem> SendQueue; 49 private BlockingQueue<QueItem> SendQueue;
48 50
49 private Queue<QueItem> IncomingPacketQueue; 51 private Queue<QueItem> IncomingPacketQueue;
@@ -127,8 +129,10 @@ namespace OpenSim.Region.ClientStack
127 129
128 public void Enqueue(QueItem item) 130 public void Enqueue(QueItem item)
129 { 131 {
132 if (!m_enabled) {return;}
130 // We could micro lock, but that will tend to actually 133 // We could micro lock, but that will tend to actually
131 // probably be worse than just synchronizing on SendQueue 134 // probably be worse than just synchronizing on SendQueue
135
132 lock (this) { 136 lock (this) {
133 switch (item.throttleType) 137 switch (item.throttleType)
134 { 138 {
@@ -209,6 +213,7 @@ namespace OpenSim.Region.ClientStack
209 213
210 public void Close() 214 public void Close()
211 { 215 {
216 m_enabled = false;
212 throttleTimer.Stop(); 217 throttleTimer.Stop();
213 } 218 }
214 219
@@ -235,18 +240,6 @@ namespace OpenSim.Region.ClientStack
235 TextureOutgoingPacketQueue.Count > 0); 240 TextureOutgoingPacketQueue.Count > 0);
236 } 241 }
237 242
238 // Run through our wait queues and flush out allotted numbers of bytes into the process queue
239
240// private bool ThrottlingTime()
241// {
242// if(DateTime.Now.Ticks > (LastThrottle + ThrottleInterval)) {
243// LastThrottle = DateTime.Now.Ticks;
244// return true;
245// } else {
246// return false;
247// }
248// }
249
250 public void ProcessThrottle() 243 public void ProcessThrottle()
251 { 244 {
252 245