5824: Fix Keep server shutdown, check errors, simplify stderr redirection.
[arvados.git] / sdk / python / arvados / keep.py
index c55b8161560a3c2b4b2ad18226fe68af4bb2cc46..8ed86fd79e96144886744dba81786ef21ef12ae8 100644 (file)
@@ -257,9 +257,9 @@ class KeepClient(object):
                 # we wait here until N other threads have started.
                 while self._started < self._local.sequence:
                     self._start_lock.wait()
+            self._todo_lock.acquire()
             self._started += 1
             self._start_lock.notifyAll()
-            self._todo_lock.acquire()
             self._start_lock.release()
             return self