ray.util.ActorPool.push#
- ActorPool.push(actor: ActorHandle)[source]#
Pushes a new actor into the current list of idle actors.
- Parameters:
actor – The Ray actor handle to add to the pool’s idle set.
Examples
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)