class_docstr: Distributed Queue
  
  This allows multiple clients to share futures or small bits of data between
  each other with a multi-producer/multi-consumer queue.  All metadata is
  sequentialized through the scheduler.
  
  Elements of the Queue must be either Futures or msgpack-encodable data
  (ints, strings, lists, dicts).  All data is sent through the scheduler so
  it is wise not to send large objects.  To share large objects scatter the
  data and share the future instead.
  
  .. warning::
  
     This object is experimental
  
  Parameters
  ----------
  name: string (optional)
      Name used by other clients and the scheduler to identify the queue. If
      not given, a random name will be generated.
  client: Client (optional)
      Client used for communication with the scheduler.
      If not given, the default global client will be used.
  maxsize: int (optional)
      Number of items allowed in the queue. If 0 (the default), the queue
      size is unbounded.
  
  Examples
  --------
  >>> from dask.distributed import Client, Queue  # doctest: +SKIP
  >>> client = Client()  # doctest: +SKIP
  >>> queue = Queue('x')  # doctest: +SKIP
  >>> future = client.submit(f, x)  # doctest: +SKIP
  >>> queue.put(future)  # doctest: +SKIP
  
  See Also
  --------
  Variable: shared variable between clients
class_docstr_tok: ["Distributed","Queue","This","allows","multiple","clients","to","share","futures","or","small","bits","of","data","between","each","other","with","a","multi-producer\/multi-consumer","queue",".","All","metadata","is","sequentialized","through","the","scheduler",".","Elements","of","the","Queue","must","be","either","Futures","or","msgpack-encodable","data","(","ints",",","strings",",","lists",",","dicts",")",".","All","data","is","sent","through","the","scheduler","so","it","is","wise","not","to","send","large","objects",".","To","share","large","objects","scatter","the","data","and","share","the","future","instead",".","..","warning",":",":","This","object","is","experimental","Parameters","--","--","--","--","--","name",":","string","(","optional",")","Name","used","by","other","clients","and","the","scheduler","to","identify","the","queue",".","If","not","given",",","a","random","name","will","be","generated",".","client",":","Client","(","optional",")","Client","used","for","communication","with","the","scheduler",".","If","not","given",",","the","default","global","client","will","be","used",".","maxsize",":","int","(","optional",")","Number","of","items","allowed","in","the","queue",".","If","0","(","the","default",")",",","the","queue","size","is","unbounded",".","Examples","--","--","--","--",">",">",">","from","dask.distributed","import","Client",",","Queue","#","doctest",":","+SKIP",">",">",">","client","=","Client","(",")","#","doctest",":","+SKIP",">",">",">","queue","=","Queue","(","'","x","'",")","#","doctest",":","+SKIP",">",">",">","future","=","client.submit","(","f",",","x",")","#","doctest",":","+SKIP",">",">",">","queue.put","(","future",")","#","doctest",":","+SKIP","See","Also","--","--","--","--","Variable",":","shared","variable","between","clients"]
code: def close(self):
      self._verify_running()
      if (
          self.client.status == "running"
      ):  # TODO: can leave zombie futures
          self.client._send_to_scheduler(
              {"op": "queue_release", "name": self.name}
          )
  
imports: from __future__ import annotations
  import asyncio
  import logging
  import uuid
  from collections import defaultdict
  from dask.utils import parse_timedelta
  from distributed.client import Future
  from distributed.utils import wait_for
  from distributed.worker import get_client
label_desc: Use image node_id 9 for calling the Queue obj's underlying member method code with example usage: obj.close() without return types