Acquire worker lock when importing actor. (#1783)

This commit is contained in:
Robert Nishihara
2018-03-26 18:31:26 -07:00
committed by Philipp Moritz
parent 0fd4112354
commit 1ab0d0ea69
+2 -1
View File
@@ -881,7 +881,8 @@ class Worker(object):
while key not in self.imported_actor_classes:
time.sleep(0.001)
self.fetch_and_register_actor(key, task.required_resources(), self)
with self.lock:
self.fetch_and_register_actor(key, task.required_resources(), self)
def _wait_for_and_process_task(self, task):
"""Wait for a task to be ready and process the task.