Skip to contentSkip to conversation

oeqa/utils/httpserver.py: HTTPServer enable thread connection handling

PATCH In review Aníbal Limón 2 participants 2 messages Aug 5, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oeqa/utils/httpserver.py: HTTPServer enable thread connection handling

HTTPServer now supports multiple connections using Python threads.

---
 meta/lib/oeqa/utils/httpserver.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/lib/oeqa/utils/httpserver.py +2 -1
index bd76f36..7d12331 100644
@@ -1,8 +1,9 @@
 import http.server
 import multiprocessing
 import os
+from socketserver import ThreadingMixIn
 
-class HTTPServer(http.server.HTTPServer):
+class HTTPServer(ThreadingMixIn, http.server.HTTPServer):
 
     def server_start(self, root_dir):
         import signal
Signature · 1 line
2.1.4
#1 lore raw
Quoted 12 lines · On Fri, 05 Aug 2016 15:30:30 Aníbal Limón wrote:

HTTPServer now supports multiple connections using Python threads.

---
 meta/lib/oeqa/utils/httpserver.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta/lib/oeqa/utils/httpserver.py index bd76f36..7d12331 100644

meta/lib/oeqa/utils/httpserver.py line 9

Quoted 10 lines
meta/lib/oeqa/utils/httpserver.py +2 -1
@@ -1,8 +1,9 @@
 import http.server
 import multiprocessing
 import os
+from socketserver import ThreadingMixIn
 
-class HTTPServer(http.server.HTTPServer):
+class HTTPServer(ThreadingMixIn, http.server.HTTPServer):
 
     def server_start(self, root_dir):
         import signal

This looks like a neat solution to the sstate serving issue Francisco has been dealing with - thanks!

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre