From 32ccd5bb40447ea4d96f1181cf73edff3645a55a Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 21 Oct 2009 23:03:18 -0700 Subject: * Changed the misc. methods calling ThreadPool.UnsafeQueueUserWorkItem() to Util.FireAndForget() * Changed Util.FireAndForget() to use any of five different methods set with async_call_method in the [Startup] section of OpenSim.ini. Look at the example config for possible values --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 8 ++------ OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/CoreModules') 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 } - ThreadPool.UnsafeQueueUserWorkItem( - delegate - { - WriteFileCache(filename, asset); - }, null - ); + Util.FireAndForget( + delegate { WriteFileCache(filename, asset); }); } } 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 // The reason is so we don't cause the thread to freeze waiting // for the 1 second it costs to start a thread manually. if (!threadrunning) - ThreadPool.UnsafeQueueUserWorkItem(this.StartThread, null); + Util.FireAndForget(this.StartThread); lock (m_rootAgents) { -- cgit v1.1