class_docstr: A condition allows one or more coroutines to wait until notified.
  
  Like a standard `threading.Condition`, but does not need an underlying lock
  that is acquired and released.
  
  With a `Condition`, coroutines can wait to be notified by other coroutines:
  
  .. testcode::
  
      import asyncio
      from tornado import gen
      from tornado.locks import Condition
  
      condition = Condition()
  
      async def waiter():
          print("I'll wait right here")
          await condition.wait()
          print("I'm done waiting")
  
      async def notifier():
          print("About to notify")
          condition.notify()
          print("Done notifying")
  
      async def runner():
          # Wait for waiter() and notifier() in parallel
          await gen.multi([waiter(), notifier()])
  
      asyncio.run(runner())
  
  .. testoutput::
  
      I'll wait right here
      About to notify
      Done notifying
      I'm done waiting
  
  `wait` takes an optional ``timeout`` argument, which is either an absolute
  timestamp::
  
      io_loop = IOLoop.current()
  
      # Wait up to 1 second for a notification.
      await condition.wait(timeout=io_loop.time() + 1)
  
  ...or a `datetime.timedelta` for a timeout relative to the current time::
  
      # Wait up to 1 second.
      await condition.wait(timeout=datetime.timedelta(seconds=1))
  
  The method returns False if there's no notification before the deadline.
  
  .. versionchanged:: 5.0
     Previously, waiters could be notified synchronously from within
     `notify`. Now, the notification will always be received on the
     next iteration of the `.IOLoop`.
class_docstr_tok: ["A","condition","allows","one","or","more","coroutines","to","wait","until","notified",".","Like","a","standard","`","threading.Condition","`",",","but","does","not","need","an","underlying","lock","that","is","acquired","and","released",".","With","a","`","Condition","`",",","coroutines","can","wait","to","be","notified","by","other","coroutines",":","..","testcode",":",":","import","asyncio","from","tornado","import","gen","from","tornado.locks","import","Condition","condition","=","Condition","(",")","async","def","waiter","(",")",":","print","(","``","I","'ll","wait","right","here","''",")","await","condition.wait","(",")","print","(","``","I","'m","done","waiting","''",")","async","def","notifier","(",")",":","print","(","``","About","to","notify","''",")","condition.notify","(",")","print","(","``","Done","notifying","''",")","async","def","runner","(",")",":","#","Wait","for","waiter","(",")","and","notifier","(",")","in","parallel","await","gen.multi","(","[","waiter","(",")",",","notifier","(",")","]",")","asyncio.run","(","runner","(",")",")","..","testoutput",":",":","I","'ll","wait","right","here","About","to","notify","Done","notifying","I","'m","done","waiting","`","wait","`","takes","an","optional","``","timeout","``","argument",",","which","is","either","an","absolute","timestamp",":",":","io_loop","=","IOLoop.current","(",")","#","Wait","up","to","1","second","for","a","notification",".","await","condition.wait","(","timeout=io_loop.time","(",")","+","1",")","...","or","a","`","datetime.timedelta","`","for","a","timeout","relative","to","the","current","time",":",":","#","Wait","up","to","1","second",".","await","condition.wait","(","timeout=datetime.timedelta","(","seconds=1",")",")","The","method","returns","False","if","there","'s","no","notification","before","the","deadline",".","..","versionchanged",":",":","5.0","Previously",",","waiters","could","be","notified","synchronously","from","within","`","notify","`",".","Now",",","the","notification","will","always","be","received","on","the","next","iteration","of","the","`",".IOLoop","`","."]
code: def __repr__(self) -> str:
      result = "<%s" % (self.__class__.__name__,)
      if self._waiters:
          result += " waiters[%s]" % len(self._waiters)
      return result + ">"
  
imports: import collections
  import datetime
  import types
  from tornado import gen, ioloop
  from tornado.concurrent import Future, future_set_result_unless_cancelled
  from typing import Union, Optional, Type, Any, Awaitable
  import typing
label_desc: Use image node_id 1 for calling the Condition obj's underlying member method code with example usage: obj.__repr__() and returns: unknown