diff options
Diffstat (limited to 'OpenSim/Region')
4 files changed, 14 insertions, 11 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index c9cec75..c04b8c2 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -92,10 +92,17 @@ namespace OpenSim | |||
92 | appender.File = fileName; | 92 | appender.File = fileName; |
93 | appender.ActivateOptions(); | 93 | appender.ActivateOptions(); |
94 | } | 94 | } |
95 | m_log.InfoFormat("[LOGGING] Logging started to file {0}", appender.File); | 95 | m_log.InfoFormat("[LOGGING]: Logging started to file {0}", appender.File); |
96 | } | 96 | } |
97 | } | 97 | } |
98 | |||
99 | string asyncCallMethodStr = startupConfig.GetString("async_call_method", String.Empty); | ||
100 | FireAndForgetMethod asyncCallMethod; | ||
101 | if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse<FireAndForgetMethod>(asyncCallMethodStr, out asyncCallMethod)) | ||
102 | Util.FireAndForgetMethod = asyncCallMethod; | ||
98 | } | 103 | } |
104 | |||
105 | m_log.Info("[OPENSIM MAIN]: Using async_call_method " + Util.FireAndForgetMethod); | ||
99 | } | 106 | } |
100 | 107 | ||
101 | /// <summary> | 108 | /// <summary> |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 432fee7..0ba76ec 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -791,7 +791,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
791 | /// <param name="map">heightmap</param> | 791 | /// <param name="map">heightmap</param> |
792 | public virtual void SendLayerData(float[] map) | 792 | public virtual void SendLayerData(float[] map) |
793 | { | 793 | { |
794 | ThreadPool.UnsafeQueueUserWorkItem(DoSendLayerData, map); | 794 | Util.FireAndForget(DoSendLayerData, map); |
795 | } | 795 | } |
796 | 796 | ||
797 | /// <summary> | 797 | /// <summary> |
@@ -931,7 +931,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
931 | /// <param name="windSpeeds">16x16 array of wind speeds</param> | 931 | /// <param name="windSpeeds">16x16 array of wind speeds</param> |
932 | public virtual void SendWindData(Vector2[] windSpeeds) | 932 | public virtual void SendWindData(Vector2[] windSpeeds) |
933 | { | 933 | { |
934 | ThreadPool.UnsafeQueueUserWorkItem(new WaitCallback(DoSendWindData), (object)windSpeeds); | 934 | Util.FireAndForget(DoSendWindData, windSpeeds); |
935 | } | 935 | } |
936 | 936 | ||
937 | /// <summary> | 937 | /// <summary> |
@@ -940,7 +940,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
940 | /// <param name="windSpeeds">16x16 array of cloud densities</param> | 940 | /// <param name="windSpeeds">16x16 array of cloud densities</param> |
941 | public virtual void SendCloudData(float[] cloudDensity) | 941 | public virtual void SendCloudData(float[] cloudDensity) |
942 | { | 942 | { |
943 | ThreadPool.UnsafeQueueUserWorkItem(new WaitCallback(DoSendCloudData), (object)cloudDensity); | 943 | Util.FireAndForget(DoSendCloudData, cloudDensity); |
944 | } | 944 | } |
945 | 945 | ||
946 | /// <summary> | 946 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index cbdca16..c6af806 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -302,12 +302,8 @@ namespace Flotsam.RegionModules.AssetCache | |||
302 | 302 | ||
303 | } | 303 | } |
304 | 304 | ||
305 | ThreadPool.UnsafeQueueUserWorkItem( | 305 | Util.FireAndForget( |
306 | delegate | 306 | delegate { WriteFileCache(filename, asset); }); |
307 | { | ||
308 | WriteFileCache(filename, asset); | ||
309 | }, null | ||
310 | ); | ||
311 | } | 307 | } |
312 | } | 308 | } |
313 | catch (Exception e) | 309 | catch (Exception e) |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 1260584..4e40084 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -1095,7 +1095,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1095 | // The reason is so we don't cause the thread to freeze waiting | 1095 | // The reason is so we don't cause the thread to freeze waiting |
1096 | // for the 1 second it costs to start a thread manually. | 1096 | // for the 1 second it costs to start a thread manually. |
1097 | if (!threadrunning) | 1097 | if (!threadrunning) |
1098 | ThreadPool.UnsafeQueueUserWorkItem(this.StartThread, null); | 1098 | Util.FireAndForget(this.StartThread); |
1099 | 1099 | ||
1100 | lock (m_rootAgents) | 1100 | lock (m_rootAgents) |
1101 | { | 1101 | { |