Calling .Close() on AutoResetEvent and ManualResetEvent (those classes contain an unmanaged resource that will not automatically be disposed when they are GCed), and commenting out some ManualResetEvents that are not in use yet
parent
a5b9971fd7
commit
494a1e922d
|
@ -146,6 +146,7 @@ namespace OpenSim.Framework.Communications
|
|||
// If the operation isn't done, wait for it
|
||||
AsyncWaitHandle.WaitOne();
|
||||
AsyncWaitHandle.Close();
|
||||
m_waitHandle.Close();
|
||||
m_waitHandle = null; // Allow early GC
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace OpenSim.Framework.Communications
|
|||
/// <summary>
|
||||
/// This flag will help block the main synchroneous method, in case we run in synchroneous mode
|
||||
/// </summary>
|
||||
public static ManualResetEvent _allDone = new ManualResetEvent(false);
|
||||
//public static ManualResetEvent _allDone = new ManualResetEvent(false);
|
||||
|
||||
/// <summary>
|
||||
/// Default time out period
|
||||
|
@ -282,12 +282,12 @@ namespace OpenSim.Framework.Communications
|
|||
else
|
||||
{
|
||||
s.Close();
|
||||
_allDone.Set();
|
||||
//_allDone.Set();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_allDone.Set();
|
||||
//_allDone.Set();
|
||||
_asyncException = e;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ namespace OpenSim.Framework
|
|||
}
|
||||
|
||||
threadFinishEvent.WaitOne();
|
||||
threadFinishEvent.Close();
|
||||
|
||||
if (exception != null)
|
||||
throw new Exception(exception.Message, exception);
|
||||
|
@ -148,6 +149,7 @@ namespace OpenSim.Framework
|
|||
}
|
||||
|
||||
threadFinishEvent.WaitOne();
|
||||
threadFinishEvent.Close();
|
||||
|
||||
if (exception != null)
|
||||
throw new Exception(exception.Message, exception);
|
||||
|
@ -199,6 +201,7 @@ namespace OpenSim.Framework
|
|||
}
|
||||
|
||||
threadFinishEvent.WaitOne();
|
||||
threadFinishEvent.Close();
|
||||
|
||||
if (exception != null)
|
||||
throw new Exception(exception.Message, exception);
|
||||
|
|
|
@ -58,6 +58,7 @@ namespace OpenSim
|
|||
m_clientServers.Count.ToString(), m_clientServers.Count > 1 ? "s" : "");
|
||||
|
||||
WorldHasComeToAnEnd.WaitOne();
|
||||
WorldHasComeToAnEnd.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
|||
public string body;
|
||||
public int responseCode;
|
||||
public string responseBody;
|
||||
public ManualResetEvent ev;
|
||||
//public ManualResetEvent ev;
|
||||
public bool requestDone;
|
||||
public int startTime;
|
||||
public string uri;
|
||||
|
@ -456,7 +456,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
|||
requestData.headers["x-query-string"] = queryString;
|
||||
requestData.headers["x-script-url"] = url.url;
|
||||
|
||||
requestData.ev = new ManualResetEvent(false);
|
||||
//requestData.ev = new ManualResetEvent(false);
|
||||
lock (url.requests)
|
||||
{
|
||||
url.requests.Add(requestID, requestData);
|
||||
|
|
Loading…
Reference in New Issue