aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 3252251..5bc85ff 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -41,6 +41,7 @@ namespace OpenSim.Framework.Servers.HttpServer
41 41
42 private readonly BaseHttpServer m_server; 42 private readonly BaseHttpServer m_server;
43 private static Queue m_requests = Queue.Synchronized(new Queue()); 43 private static Queue m_requests = Queue.Synchronized(new Queue());
44 private static ManualResetEvent m_ev = new ManualResetEvent(false);
44 private uint m_WorkerThreadCount = 0; 45 private uint m_WorkerThreadCount = 0;
45 private Thread[] m_workerThreads; 46 private Thread[] m_workerThreads;
46 private PollServiceWorkerThread[] m_PollServiceWorkerThreads; 47 private PollServiceWorkerThread[] m_PollServiceWorkerThreads;
@@ -90,15 +91,17 @@ namespace OpenSim.Framework.Servers.HttpServer
90 { 91 {
91 lock (m_requests) 92 lock (m_requests)
92 m_requests.Enqueue(req); 93 m_requests.Enqueue(req);
94 m_ev.Set();
93 } 95 }
94 96
95 public void ThreadStart() 97 public void ThreadStart()
96 { 98 {
97 while (m_running) 99 while (m_running)
98 { 100 {
101 m_ev.WaitOne(1000);
102 m_ev.Reset();
99 Watchdog.UpdateThread(); 103 Watchdog.UpdateThread();
100 ProcessQueuedRequests(); 104 ProcessQueuedRequests();
101 Thread.Sleep(1000);
102 } 105 }
103 } 106 }
104 107
@@ -154,4 +157,4 @@ namespace OpenSim.Framework.Servers.HttpServer
154 m_running = false; 157 m_running = false;
155 } 158 }
156 } 159 }
157} \ No newline at end of file 160}