(self, actors: list)
| 38 | """ |
| 39 | |
| 40 | def __init__(self, actors: list): |
| 41 | from ray._common.usage.usage_lib import record_library_usage |
| 42 | |
| 43 | record_library_usage("util.ActorPool") |
| 44 | |
| 45 | # actors to be used |
| 46 | self._idle_actors = list(actors) |
| 47 | |
| 48 | # get actor from future |
| 49 | self._future_to_actor = {} |
| 50 | |
| 51 | # get future from index |
| 52 | self._index_to_future = {} |
| 53 | |
| 54 | # next task to do |
| 55 | self._next_task_index = 0 |
| 56 | |
| 57 | # next task to return |
| 58 | self._next_return_index = 0 |
| 59 | |
| 60 | # next work depending when actors free |
| 61 | self._pending_submits = [] |
| 62 | |
| 63 | def map(self, fn: Callable[["ray.actor.ActorHandle", V], Any], values: List[V]): |
| 64 | """Apply the given function in parallel over the actors and values. |
nothing calls this directly
no test coverage detected