switching to safer locks.
parent
7f0bcc5aa1
commit
7420f96128
11
.hgignore
11
.hgignore
|
@ -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)$
|
||||||
.+~$
|
.+~$
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue