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","."]
code: def completed(self, blocking_wait=False):
      pending = list(self._tasks)
      if pending:
          ready, _ = ray.wait(
              pending, num_returns=len(pending), timeout=0
          )
          if not ready and blocking_wait:
              ready, _ = ray.wait(pending, num_returns=1, timeout=10.0)
          for obj_ref in ready:
              yield (
                  self._tasks.pop(obj_ref),
                  self._objects.pop(obj_ref),
              )
  
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 3 for calling the TaskPool obj's underlying member method code with example usage: obj.completed(blocking_wait) without return types