Explorar el Código

Fix buffering quirk in py3: if the read would return EAGAIN then readinto would return none (instead of raising).

Ionel Cristian Mărieș hace 11 años
padre
commit
c3c98a5bb2
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      celery/concurrency/workhorse.py

+ 2 - 1
celery/concurrency/workhorse.py

@@ -163,7 +163,8 @@ class TaskPool(BasePool):
         si = signalfd_siginfo()
         while True:
             try:
-                self.sigfh.readinto(si)
+                if not self.sigfh.readinto(si):
+                    break
             except IOError as exc:
                 if exc.errno != errno.EAGAIN:
                     raise