return ret
def handle(self, req):
- start = False
+ spawn = False
with self.qlk:
if self.timeout is not None:
now = start = time.time()
self.queue.append(req)
self.qcond.notify()
if len(self.waiting) < 1:
- start = True
- if start:
+ spawn = True
+ if spawn:
with self.clk:
if len(self.current) < self.max:
th = reqthread(target=self.run)