aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-09-05 23:20:59 +0100
committerJustin Clark-Casey (justincc)2014-09-05 23:20:59 +0100
commit41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf (patch)
treec3f55715685c213673697e09d234e82616f0dc9c /OpenSim/Framework/Util.cs
parentMake LLUDP output queue refill thread active by default, since load tests hav... (diff)
downloadopensim-SC-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.zip
opensim-SC-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.tar.gz
opensim-SC-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.tar.bz2
opensim-SC-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.tar.xz
For monitoring purposes, start non-timeout tasks (which do not currently use a threadpool) via Watchdog.RunInThread() rather than Util.RunThreadNoTimeout()
The functionality is the same but this allow us to monitor such tasks via "show threads" and abort them for test purposes, etc. Also extends thread names to provide more info (e.g. SendInitialDataToClient says what client the task is for).
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs30
1 files changed, 0 insertions, 30 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 2c38571..fefa050 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -2400,36 +2400,6 @@ namespace OpenSim.Framework
2400 #endregion FireAndForget Threading Pattern 2400 #endregion FireAndForget Threading Pattern
2401 2401
2402 /// <summary> 2402 /// <summary>
2403 /// Run the callback on a different thread, outside the thread pool. This is used for tasks
2404 /// that may take a long time.
2405 /// </summary>
2406 public static void RunThreadNoTimeout(WaitCallback callback, string name, object obj)
2407 {
2408 if (FireAndForgetMethod == FireAndForgetMethod.RegressionTest)
2409 {
2410 Culture.SetCurrentCulture();
2411 callback(obj);
2412 return;
2413 }
2414
2415 Thread t = new Thread(delegate()
2416 {
2417 try
2418 {
2419 Culture.SetCurrentCulture();
2420 callback(obj);
2421 }
2422 catch (Exception e)
2423 {
2424 m_log.Error("Exception in thread " + name, e);
2425 }
2426 });
2427
2428 t.Name = name;
2429 t.Start();
2430 }
2431
2432 /// <summary>
2433 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive 2403 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive
2434 /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap 2404 /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
2435 /// for the callers. 2405 /// for the callers.