aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-22 12:33:23 -0700
committerJohn Hurliman2009-10-22 12:33:23 -0700
commitb2ed348aa2746fbf034b713d006e40366c479d5a (patch)
tree26c114e88f54e64e1fdf17dcc7de1e54165db2bc /OpenSim/Framework/Servers/HttpServer
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.zip
opensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.gz
opensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.bz2
opensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.xz
Implemented a Watchdog class. Do not manually create Thread objects anymore, use Watchdog.StartThread(). While your thread is running call Watchdog.UpdateThread(). When it is shutting down call Watchdog.RemoveThread(). Most of the threads in OpenSim have been updated
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs8
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs6
2 files changed, 2 insertions, 12 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 85d7be2..bec5ed3 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1559,15 +1559,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1559 public void Start() 1559 public void Start()
1560 { 1560 {
1561 m_log.Info("[HTTPD]: Starting up HTTP Server"); 1561 m_log.Info("[HTTPD]: Starting up HTTP Server");
1562
1563 //m_workerThread = new Thread(new ThreadStart(StartHTTP));
1564 //m_workerThread.Name = "HttpThread";
1565 //m_workerThread.IsBackground = true;
1566 //m_workerThread.Start();
1567 //ThreadTracker.Add(m_workerThread);
1568 StartHTTP(); 1562 StartHTTP();
1569
1570
1571 } 1563 }
1572 1564
1573 private void StartHTTP() 1565 private void StartHTTP()
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 1c54581..e7a64f7 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -50,9 +50,7 @@ namespace OpenSim.Framework.Servers.HttpServer
50 m_WorkerThreadCount = pWorkerThreadCount; 50 m_WorkerThreadCount = pWorkerThreadCount;
51 m_workerThreads = new Thread[m_WorkerThreadCount]; 51 m_workerThreads = new Thread[m_WorkerThreadCount];
52 m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount]; 52 m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount];
53 m_watcherThread = new Thread(ThreadStart);
54 53
55
56 //startup worker threads 54 //startup worker threads
57 for (uint i=0;i<m_WorkerThreadCount;i++) 55 for (uint i=0;i<m_WorkerThreadCount;i++)
58 { 56 {
@@ -65,11 +63,11 @@ namespace OpenSim.Framework.Servers.HttpServer
65 m_workerThreads[i].Start(); 63 m_workerThreads[i].Start();
66 64
67 } 65 }
66
68 //start watcher threads 67 //start watcher threads
68 m_watcherThread = new Thread(ThreadStart);
69 m_watcherThread.Name = "PollServiceWatcherThread"; 69 m_watcherThread.Name = "PollServiceWatcherThread";
70 m_watcherThread.Start(); 70 m_watcherThread.Start();
71
72
73 } 71 }
74 72
75 internal void ReQueueEvent(PollServiceHttpRequest req) 73 internal void ReQueueEvent(PollServiceHttpRequest req)