From 7420f96128020ba158d9712497d3c36796c88087 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 7 Jul 2008 09:58:01 +0000 Subject: switching to safer locks. --- OpenSim/Framework/Servers/OSHttpRequestQueue.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Servers/OSHttpRequestQueue.cs b/OpenSim/Framework/Servers/OSHttpRequestQueue.cs index f3dfda4..f6f1829 100644 --- a/OpenSim/Framework/Servers/OSHttpRequestQueue.cs +++ b/OpenSim/Framework/Servers/OSHttpRequestQueue.cs @@ -38,12 +38,14 @@ namespace OpenSim.Framework.Servers /// public class OSHttpRequestQueue : Queue { + private object _syncObject = new object(); + new public void Enqueue(OSHttpRequest req) { - lock (this) + lock (_syncObject) { base.Enqueue(req); - Monitor.Pulse(this); + Monitor.Pulse(_syncObject); } } @@ -51,11 +53,11 @@ namespace OpenSim.Framework.Servers { OSHttpRequest req = null; - lock (this) + lock (_syncObject) { while (null == req) { - Monitor.Wait(this); + Monitor.Wait(_syncObject); if (0 != this.Count) req = base.Dequeue(); } } -- cgit v1.1