aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-11 20:33:29 +0000
committerJustin Clarke Casey2008-11-11 20:33:29 +0000
commita814ac3d671880474ca35dd1934e8ea7a9a6f81b (patch)
treebeb2f327055a6c16a10355b9cd97735b5e4366f8 /OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
parentPrevent pieces from other people's HUDs from displaying at the center of (diff)
downloadopensim-SC_OLD-a814ac3d671880474ca35dd1934e8ea7a9a6f81b.zip
opensim-SC_OLD-a814ac3d671880474ca35dd1934e8ea7a9a6f81b.tar.gz
opensim-SC_OLD-a814ac3d671880474ca35dd1934e8ea7a9a6f81b.tar.bz2
opensim-SC_OLD-a814ac3d671880474ca35dd1934e8ea7a9a6f81b.tar.xz
* Put an Enabled switch on the async object deleter for future testing purposes
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
index ca28bbd..706ba6a 100644
--- a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
+++ b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
@@ -54,9 +54,14 @@ namespace OpenSim.Region.Environment.Scenes
54 private static readonly ILog m_log 54 private static readonly ILog m_log
55 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 55 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56 56
57 /// <value>
58 /// Is the deleter currently enabled?
59 /// </value>
60 public bool Enabled;
61
57 private Timer m_inventoryTicker = new Timer(2000); 62 private Timer m_inventoryTicker = new Timer(2000);
58 private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>(); 63 private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>();
59 private Scene m_scene; 64 private Scene m_scene;
60 65
61 public AsyncSceneObjectGroupDeleter(Scene scene) 66 public AsyncSceneObjectGroupDeleter(Scene scene)
62 { 67 {
@@ -73,7 +78,8 @@ namespace OpenSim.Region.Environment.Scenes
73 SceneObjectGroup objectGroup, IClientAPI remoteClient, 78 SceneObjectGroup objectGroup, IClientAPI remoteClient,
74 bool permissionToDelete) 79 bool permissionToDelete)
75 { 80 {
76 m_inventoryTicker.Stop(); 81 if (Enabled)
82 m_inventoryTicker.Stop();
77 83
78 lock (m_inventoryDeletes) 84 lock (m_inventoryDeletes)
79 { 85 {
@@ -87,7 +93,8 @@ namespace OpenSim.Region.Environment.Scenes
87 m_inventoryDeletes.Enqueue(dtis); 93 m_inventoryDeletes.Enqueue(dtis);
88 } 94 }
89 95
90 m_inventoryTicker.Start(); 96 if (Enabled)
97 m_inventoryTicker.Start();
91 98
92 // Visually remove it, even if it isnt really gone yet. 99 // Visually remove it, even if it isnt really gone yet.
93 if (permissionToDelete) 100 if (permissionToDelete)
@@ -132,6 +139,7 @@ namespace OpenSim.Region.Environment.Scenes
132 m_log.DebugFormat("Exception background deleting object: "+e.ToString()); 139 m_log.DebugFormat("Exception background deleting object: "+e.ToString());
133 } 140 }
134 } 141 }
142
135 return true; 143 return true;
136 } 144 }
137 } 145 }