mirror of
https://github.com/wassname/ray.git
synced 2026-07-03 07:10:35 +08:00
Acquire worker lock when importing actor. (#1783)
This commit is contained in:
committed by
Philipp Moritz
parent
0fd4112354
commit
1ab0d0ea69
@@ -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