switching to safer locks.

0.6.0-stable
Dr Scofield 2008-07-07 09:58:01 +00:00
parent 7f0bcc5aa1
commit 7420f96128
2 changed files with 12 additions and 9 deletions

View File

@ -1,4 +1,3 @@
^tailor.state$
^tailor.state.old$ ^tailor.state.old$
^tailor.state.journal$ ^tailor.state.journal$
\.csproj$ \.csproj$
@ -6,12 +5,14 @@
\.mdp$ \.mdp$
\.mds$ \.mds$
\.dll\.build$ \.dll\.build$
/bin/Debug/.+\.dll$ ^bin/Debug/.+\.dll$
/bin/Debug/.+\.dll.mdb$ bin/.+\.dll.mdb$
^bin/.+\.dll$ bin/addin-db-
bin/.+\.dll$
bin/.+\.maddin$
Examples/.+\.dll$
^bin/.+\.exe ^bin/.+\.exe
^(OpenSim|Prebuild)/.+\.(exe|exe\.build|exe\.mdb)$ ^(OpenSim|Prebuild)/.+\.(exe|exe\.build|exe\.mdb)$
^OpenSim\.(build|sln)$ ^OpenSim\.(build|sln)$
^Prebuild/Prebuild\.(build|sln)$ ^Prebuild/Prebuild\.(build|sln)$
.+~$ .+~$

View File

@ -38,12 +38,14 @@ namespace OpenSim.Framework.Servers
/// </summary> /// </summary>
public class OSHttpRequestQueue : Queue<OSHttpRequest> public class OSHttpRequestQueue : Queue<OSHttpRequest>
{ {
private object _syncObject = new object();
new public void Enqueue(OSHttpRequest req) new public void Enqueue(OSHttpRequest req)
{ {
lock (this) lock (_syncObject)
{ {
base.Enqueue(req); base.Enqueue(req);
Monitor.Pulse(this); Monitor.Pulse(_syncObject);
} }
} }
@ -51,11 +53,11 @@ namespace OpenSim.Framework.Servers
{ {
OSHttpRequest req = null; OSHttpRequest req = null;
lock (this) lock (_syncObject)
{ {
while (null == req) while (null == req)
{ {
Monitor.Wait(this); Monitor.Wait(_syncObject);
if (0 != this.Count) req = base.Dequeue(); if (0 != this.Count) req = base.Dequeue();
} }
} }