@@ -435,6 +435,7 @@ class TaskPool(BasePool):
apply_at = hub.timer.apply_at
maintain_pool = self.maintain_pool
on_soft_timeout = self.on_soft_timeout
+ on_hard_timeout = self.on_hard_timeout
fileno_to_inq = pool._fileno_to_inq
fileno_to_outq = pool._fileno_to_outq
fileno_to_synq = pool._fileno_to_synq
@@ -80,6 +80,7 @@ class WorkController(configurated):
pidlock = None
namespace = None
pool = None
+ semaphore = None
class Namespace(bootsteps.Namespace):
"""Worker bootstep namespace."""
@@ -296,7 +297,6 @@ class WorkController(configurated):
'nivcsw': s.ru_nivcsw,
}
-
def stats(self):
info = self.info()
info.update(self.namespace.info(self))
@@ -100,14 +100,14 @@ def asynloop(obj, connection, consumer, strategies, ns, hub, qos,
if not events:
conn_poll_empty()
for fileno, event in events or ():
- cb = flags = None
+ cb = None
try:
if event & READ:
- cb, flags = readers[fileno], READ | ERR
+ cb = readers[fileno]
elif event & WRITE:
- cb, flags = writers[fileno], WRITE
+ cb = writers[fileno]
elif event & ERR:
- cb, flags = (readers.get(fileno) or
+ cb = (readers.get(fileno) or
writers.get(fileno))
if cb is None:
continue