mirror of
https://github.com/wassname/ray.git
synced 2026-10-02 12:41:04 +08:00
Acquire worker lock when importing actor. (#1783)
This commit is contained in:
1 parent
0fd4112354
commit
1ab0d0ea69
1 file changed
+2
-1
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user