Browse Source

network: use get_nowait on one of the two queues

283
ThomasV 10 years ago
parent
commit
2104e96a66
  1. 5
      lib/network.py

5
lib/network.py

@ -430,10 +430,11 @@ class Network(util.DaemonThread):
self.response_queue.put(response)
def handle_requests(self):
while True:
try:
request = self.requests_queue.get(timeout=0.1)
request = self.requests_queue.get_nowait()
except Queue.Empty:
return
break
self.process_request(request)
def process_request(self, request):

Loading…
Cancel
Save