diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Monitoring/WorkManager.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Framework/Monitoring/WorkManager.cs b/OpenSim/Framework/Monitoring/WorkManager.cs index 9d52f71..5d9b185 100644 --- a/OpenSim/Framework/Monitoring/WorkManager.cs +++ b/OpenSim/Framework/Monitoring/WorkManager.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Monitoring | |||
57 | 57 | ||
58 | static WorkManager() | 58 | static WorkManager() |
59 | { | 59 | { |
60 | JobEngine = new JobEngine("Non-blocking non-critical job engine", "JOB ENGINE"); | 60 | JobEngine = new JobEngine("Non-blocking non-critical job engine", "JOB ENGINE", 30000); |
61 | 61 | ||
62 | StatsManager.RegisterStat( | 62 | StatsManager.RegisterStat( |
63 | new Stat( | 63 | new Stat( |
@@ -182,9 +182,9 @@ namespace OpenSim.Framework.Monitoring | |||
182 | /// <param name="callback"></param> | 182 | /// <param name="callback"></param> |
183 | /// <param name="obj"></param> | 183 | /// <param name="obj"></param> |
184 | /// <param name="name">The name of the job. This is used in monitoring and debugging.</param> | 184 | /// <param name="name">The name of the job. This is used in monitoring and debugging.</param> |
185 | public static void RunInThreadPool(System.Threading.WaitCallback callback, object obj, string name) | 185 | public static void RunInThreadPool(System.Threading.WaitCallback callback, object obj, string name, bool timeout = true) |
186 | { | 186 | { |
187 | Util.FireAndForget(callback, obj, name); | 187 | Util.FireAndForget(callback, obj, name, timeout); |
188 | } | 188 | } |
189 | 189 | ||
190 | /// <summary> | 190 | /// <summary> |
@@ -231,10 +231,8 @@ namespace OpenSim.Framework.Monitoring | |||
231 | JobEngine.QueueJob(name, () => callback(obj)); | 231 | JobEngine.QueueJob(name, () => callback(obj)); |
232 | else if (canRunInThisThread) | 232 | else if (canRunInThisThread) |
233 | callback(obj); | 233 | callback(obj); |
234 | else if (mustNotTimeout) | ||
235 | RunInThread(callback, obj, name, log); | ||
236 | else | 234 | else |
237 | Util.FireAndForget(callback, obj, name); | 235 | Util.FireAndForget(callback, obj, name, !mustNotTimeout); |
238 | } | 236 | } |
239 | 237 | ||
240 | private static void HandleControlCommand(string module, string[] args) | 238 | private static void HandleControlCommand(string module, string[] args) |