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::
  
      from tornado import gen
      from tornado.ioloop import IOLoop
      from tornado.locks import Condition
  
      condition = Condition()
  
      @gen.coroutine
      def waiter():
          print("I'll wait right here")
          yield condition.wait()  # Yield a Future.
          print("I'm done waiting")
  
      @gen.coroutine
      def notifier():
          print("About to notify")
          condition.notify()
          print("Done notifying")
  
      @gen.coroutine
      def runner():
          # Yield two Futures; wait for waiter() and notifier() to finish.
          yield [waiter(), notifier()]
  
      IOLoop.current().run_sync(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.
      yield condition.wait(timeout=io_loop.time() + 1)
  
  ...or a `datetime.timedelta` for a timeout relative to the current time::
  
      # Wait up to 1 second.
      yield condition.wait(timeout=datetime.timedelta(seconds=1))
  
  The method raises `tornado.gen.TimeoutError` if there's no notification
  before the deadline.
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",":",":","from","tornado","import","gen","from","tornado.ioloop","import","IOLoop","from","tornado.locks","import","Condition","condition","=","Condition","(",")","@","gen.coroutine","def","waiter","(",")",":","print","(","``","I","'ll","wait","right","here","''",")","yield","condition.wait","(",")","#","Yield","a","Future",".","print","(","``","I","'m","done","waiting","''",")","@","gen.coroutine","def","notifier","(",")",":","print","(","``","About","to","notify","''",")","condition.notify","(",")","print","(","``","Done","notifying","''",")","@","gen.coroutine","def","runner","(",")",":","#","Yield","two","Futures",";","wait","for","waiter","(",")","and","notifier","(",")","to","finish",".","yield","[","waiter","(",")",",","notifier","(",")","]","IOLoop.current","(",")",".run_sync","(","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",".","yield","condition.wait","(","timeout=io_loop.time","(",")","+","1",")","...","or","a","`","datetime.timedelta","`","for","a","timeout","relative","to","the","current","time",":",":","#","Wait","up","to","1","second",".","yield","condition.wait","(","timeout=datetime.timedelta","(","seconds=1",")",")","The","method","raises","`","tornado.gen.TimeoutError","`","if","there","'s","no","notification","before","the","deadline","."]
code: def __repr__(self):
      result = "<%s" % (self.__class__.__name__,)
      if self._waiters:
          result += " waiters[%s]" % len(self._waiters)
      return result + ">"
  
imports: from __future__ import absolute_import, division, print_function
  import collections
  from tornado import gen, ioloop
  from tornado.concurrent import Future
label_desc: Use image node_id 2 for calling the Condition obj's underlying member method code with example usage: obj.__repr__() and returns: unknown