class_docstr: A first-in, first-out queue implementation on Ray.
  
  The behavior and use cases are similar to those of the asyncio.Queue class.
  
  Features both sync and async put and get methods.  Provides the option to
  block until space is available when calling put on a full queue,
  or to block until items are available when calling get on an empty queue.
  
  Optionally supports batched put and get operations to minimize
  serialization overhead.
  
  Args:
      maxsize (optional, int): maximum size of the queue. If zero, size is
          unbounded.
      actor_options (optional, Dict): Dictionary of options to pass into
          the QueueActor during creation. These are directly passed into
          QueueActor.options(...). This could be useful if you
          need to pass in custom resource requirements, for example.
  
  Examples:
      .. testcode::
  
          from ray.util.queue import Queue
          q = Queue()
          items = list(range(10))
          for item in items:
              q.put(item)
          for item in items:
              assert item == q.get()
          # Create Queue with the underlying actor reserving 1 CPU.
          q = Queue(actor_options={"num_cpus": 1})
docstr: Adds an item to the queue.
  
  If block is True and the queue is full, blocks until the queue is no
  longer full or until timeout.
  
  There is no guarantee of order if multiple producers put to the same
  full queue.
  
  Raises:
      Full: if the queue is full and blocking is False.
      Full: if the queue is full, blocking is True, and it timed out.
      ValueError: if timeout is negative.
docstr_tok: ["Adds","an","item","to","the","queue",".","If","block","is","True","and","the","queue","is","full",",","blocks","until","the","queue","is","no","longer","full","or","until","timeout",".","There","is","no","guarantee","of","order","if","multiple","producers","put","to","the","same","full","queue",".","Raises",":","Full",":","if","the","queue","is","full","and","blocking","is","False",".","Full",":","if","the","queue","is","full",",","blocking","is","True",",","and","it","timed","out",".","ValueError",":","if","timeout","is","negative","."]
code: def put(
      self,
      item: Any,
      block: bool = True,
      timeout: Optional[float] = None,
  ) -> None:
      """Adds an item to the queue.
  
      If block is True and the queue is full, blocks until the queue is no
      longer full or until timeout.
  
      There is no guarantee of order if multiple producers put to the same
      full queue.
  
      Raises:
          Full: if the queue is full and blocking is False.
          Full: if the queue is full, blocking is True, and it timed out.
          ValueError: if timeout is negative.
      """
      if not block:
          try:
              ray.get(self.actor.put_nowait.remote(item))
          except asyncio.QueueFull:
              raise Full
      else:
          if timeout is not None and timeout < 0:
              raise ValueError(
                  "'timeout' must be a non-negative number"
              )
          else:
              ray.get(self.actor.put.remote(item, timeout))
  
imports: import asyncio
  from typing import Optional, Any, List, Dict
  from collections.abc import Iterable
  import ray
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 7 for calling the Queue obj's underlying member method code with example usage: obj.put(item, block, timeout) without return types