Merge branch 'master' into careminster-presence-refactor
commit
3fc5b6a8ec
|
@ -46,7 +46,7 @@ using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
using BclExtras;
|
// using BclExtras;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
using Amib.Threading;
|
using Amib.Threading;
|
||||||
|
@ -1375,8 +1375,29 @@ namespace OpenSim.Framework
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Created to work around a limitation in Mono with nested delegates
|
/// Created to work around a limitation in Mono with nested delegates
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private class FireAndForgetWrapper
|
private sealed class FireAndForgetWrapper
|
||||||
{
|
{
|
||||||
|
private static volatile FireAndForgetWrapper instance;
|
||||||
|
private static object syncRoot = new Object();
|
||||||
|
|
||||||
|
public static FireAndForgetWrapper Instance {
|
||||||
|
get {
|
||||||
|
|
||||||
|
if (instance == null)
|
||||||
|
{
|
||||||
|
lock (syncRoot)
|
||||||
|
{
|
||||||
|
if (instance == null)
|
||||||
|
{
|
||||||
|
instance = new FireAndForgetWrapper();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void FireAndForget(System.Threading.WaitCallback callback)
|
public void FireAndForget(System.Threading.WaitCallback callback)
|
||||||
{
|
{
|
||||||
callback.BeginInvoke(null, EndFireAndForget, callback);
|
callback.BeginInvoke(null, EndFireAndForget, callback);
|
||||||
|
@ -1445,7 +1466,7 @@ namespace OpenSim.Framework
|
||||||
ThreadPool.QueueUserWorkItem(callback, obj);
|
ThreadPool.QueueUserWorkItem(callback, obj);
|
||||||
break;
|
break;
|
||||||
case FireAndForgetMethod.BeginInvoke:
|
case FireAndForgetMethod.BeginInvoke:
|
||||||
FireAndForgetWrapper wrapper = Singleton.GetInstance<FireAndForgetWrapper>();
|
FireAndForgetWrapper wrapper = FireAndForgetWrapper.Instance;
|
||||||
wrapper.FireAndForget(callback, obj);
|
wrapper.FireAndForget(callback, obj);
|
||||||
break;
|
break;
|
||||||
case FireAndForgetMethod.SmartThreadPool:
|
case FireAndForgetMethod.SmartThreadPool:
|
||||||
|
|
Binary file not shown.
|
@ -158,7 +158,6 @@
|
||||||
<Reference name="System.Data"/>
|
<Reference name="System.Data"/>
|
||||||
<Reference name="System.Drawing"/>
|
<Reference name="System.Drawing"/>
|
||||||
<Reference name="System.Web"/>
|
<Reference name="System.Web"/>
|
||||||
<Reference name="BclExtras35" path="../../bin/"/>
|
|
||||||
<Reference name="OpenMetaverseTypes" path="../../bin/"/>
|
<Reference name="OpenMetaverseTypes" path="../../bin/"/>
|
||||||
<Reference name="OpenMetaverse" path="../../bin/"/>
|
<Reference name="OpenMetaverse" path="../../bin/"/>
|
||||||
<Reference name="OpenMetaverse.StructuredData" path="../../bin/"/>
|
<Reference name="OpenMetaverse.StructuredData" path="../../bin/"/>
|
||||||
|
@ -1628,7 +1627,6 @@
|
||||||
<Reference name="OpenSim.Region.ClientStack"/>
|
<Reference name="OpenSim.Region.ClientStack"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
<Reference name="OpenSim.Services.Interfaces"/>
|
<Reference name="OpenSim.Services.Interfaces"/>
|
||||||
<Reference name="BclExtras35" path="../../../../bin/"/>
|
|
||||||
<Reference name="XMLRPC" path="../../../../bin/"/>
|
<Reference name="XMLRPC" path="../../../../bin/"/>
|
||||||
<Reference name="Nini" path="../../../../bin/"/>
|
<Reference name="Nini" path="../../../../bin/"/>
|
||||||
<Reference name="log4net" path="../../../../bin/"/>
|
<Reference name="log4net" path="../../../../bin/"/>
|
||||||
|
|
Loading…
Reference in New Issue