class_docstr: Helper class for tracking the status of many in-flight actor tasks.
class_docstr_tok: ["Helper","class","for","tracking","the","status","of","many","in-flight","actor","tasks","."]
docstr: Similar to completed but only returns once the object is local.
  
  Assumes obj_ref only is one id.
docstr_tok: ["Similar","to","completed","but","only","returns","once","the","object","is","local",".","Assumes","obj_ref","only","is","one","id","."]
code: def completed_prefetch(self, blocking_wait=False, max_yield=999):
      """Similar to completed but only returns once the object is local.
  
      Assumes obj_ref only is one id."""
  
      for worker, obj_ref in self.completed(
          blocking_wait=blocking_wait
      ):
          self._fetching.append((worker, obj_ref))
  
      for _ in range(max_yield):
          if not self._fetching:
              break
  
          yield self._fetching.popleft()
  
file_path: ray/rllib/utils/actors.py
imports: from collections import defaultdict, deque
  import logging
  import platform
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Type
  import ray
  from ray.actor import ActorClass, ActorHandle
label_desc: Use image node_id 4 for calling the TaskPool obj's underlying member method code with example usage: obj.completed_prefetch(blocking_wait, max_yield) without return types