aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorOren Hurvitz2014-01-29 16:14:27 +0200
committerOren Hurvitz2014-03-25 08:01:55 +0100
commite131e73652cf6ed2407e41c7d83dc67f49ca23ee (patch)
treee0d8573e47c8edd7f2effca8d4177bc57bd10a26 /OpenSim/Region/CoreModules
parentChanged LogThreadPool to have 4 logging levels. Added console command "debug ... (diff)
downloadopensim-SC-e131e73652cf6ed2407e41c7d83dc67f49ca23ee.zip
opensim-SC-e131e73652cf6ed2407e41c7d83dc67f49ca23ee.tar.gz
opensim-SC-e131e73652cf6ed2407e41c7d83dc67f49ca23ee.tar.bz2
opensim-SC-e131e73652cf6ed2407e41c7d83dc67f49ca23ee.tar.xz
Run slow operations in a separate thread, instead of using FireAndForget (which has a 1-minute timeout)
Resolves http://opensimulator.org/mantis/view.php?id=6945
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs6
4 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 4292719..d15703e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -356,7 +356,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
356 m_scene.UserAccountService, m_scene.RegionInfo.ScopeID, 356 m_scene.UserAccountService, m_scene.RegionInfo.ScopeID,
357 options, ReceivedAllAssets); 357 options, ReceivedAllAssets);
358 358
359 Util.FireAndForget(o => ar.Execute()); 359 Util.RunThreadNoTimeout(o => ar.Execute(), "AssetsRequest", null);
360 } 360 }
361 else 361 else
362 { 362 {
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
index 99913a9..6832b1f 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
@@ -193,12 +193,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
193 // Protect ourselves against the caller subsequently modifying the items list 193 // Protect ourselves against the caller subsequently modifying the items list
194 List<InventoryItemBase> items = new List<InventoryItemBase>(invCol.Items); 194 List<InventoryItemBase> items = new List<InventoryItemBase>(invCol.Items);
195 195
196 Util.FireAndForget(delegate 196 Util.RunThreadNoTimeout(delegate
197 { 197 {
198 foreach (InventoryItemBase item in items) 198 foreach (InventoryItemBase item in items)
199 if (!string.IsNullOrEmpty(item.CreatorData)) 199 if (!string.IsNullOrEmpty(item.CreatorData))
200 UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); 200 UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
201 }); 201 }, "GetFolderContent", null);
202 } 202 }
203 203
204 return invCol; 204 return invCol;
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
index cd95ee9..136a16e 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
@@ -199,7 +199,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
199 m_rootScene.AssetService, m_rootScene.UserAccountService, 199 m_rootScene.AssetService, m_rootScene.UserAccountService,
200 m_rootScene.RegionInfo.ScopeID, options, ReceivedAllAssets); 200 m_rootScene.RegionInfo.ScopeID, options, ReceivedAllAssets);
201 201
202 Util.FireAndForget(o => ar.Execute()); 202 Util.RunThreadNoTimeout(o => ar.Execute(), "AssetsRequest", null);
203 203
204 // CloseArchive() will be called from ReceivedAllAssets() 204 // CloseArchive() will be called from ReceivedAllAssets()
205 } 205 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
index 2d0da61..4f428c3 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
@@ -143,7 +143,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
143 m_requestState = RequestState.Running; 143 m_requestState = RequestState.Running;
144 144
145 m_log.DebugFormat("[ARCHIVER]: AssetsRequest executed looking for {0} possible assets", m_repliesRequired); 145 m_log.DebugFormat("[ARCHIVER]: AssetsRequest executed looking for {0} possible assets", m_repliesRequired);
146 146
147 // We can stop here if there are no assets to fetch 147 // We can stop here if there are no assets to fetch
148 if (m_repliesRequired == 0) 148 if (m_repliesRequired == 0)
149 { 149 {
@@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
226 finally 226 finally
227 { 227 {
228 if (timedOut) 228 if (timedOut)
229 Util.FireAndForget(PerformAssetsRequestCallback, true); 229 Util.RunThreadNoTimeout(PerformAssetsRequestCallback, "AssetsRequestCallback", true);
230 } 230 }
231 } 231 }
232 232
@@ -295,7 +295,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
295 295
296 // We want to stop using the asset cache thread asap 296 // We want to stop using the asset cache thread asap
297 // as we now need to do the work of producing the rest of the archive 297 // as we now need to do the work of producing the rest of the archive
298 Util.FireAndForget(PerformAssetsRequestCallback, false); 298 Util.RunThreadNoTimeout(PerformAssetsRequestCallback, "AssetsRequestCallback", false);
299 } 299 }
300 else 300 else
301 { 301 {