Explorar o código

joining of threads broke the tests

Ask Solem %!s(int64=15) %!d(string=hai) anos
pai
achega
f2911e4a5d
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      celery/worker/heartbeat.py

+ 2 - 1
celery/worker/heartbeat.py

@@ -58,4 +58,5 @@ class Heart(threading.Thread):
         self._state = "CLOSE"
         self._shutdown.set()
         self._stopped.wait() # block until this thread is done
-        self.join(1e100)
+        if self.isAlive():
+            self.join(1e100)