ray.util.ActorPool.push# ActorPool.push(actor)[源代码]# 将一个新的执行者推入当前空闲执行者列表中。 示例 import ray from ray.util.actor_pool import ActorPool @ray.remote class Actor: def double(self, v): return 2 * v a1, a2 = Actor.remote(), Actor.remote() pool = ActorPool([a1]) pool.push(a2)