class_docstr: An event blocks coroutines until its internal flag is set to True.
  
  Similar to `threading.Event`.
  
  A coroutine can wait for an event to be set. Once it is set, calls to
  ``yield event.wait()`` will not block unless the event has been cleared:
  
  .. testcode::
  
      from tornado import gen
      from tornado.ioloop import IOLoop
      from tornado.locks import Event
  
      event = Event()
  
      @gen.coroutine
      def waiter():
          print("Waiting for event")
          yield event.wait()
          print("Not waiting this time")
          yield event.wait()
          print("Done")
  
      @gen.coroutine
      def setter():
          print("About to set the event")
          event.set()
  
      @gen.coroutine
      def runner():
          yield [waiter(), setter()]
  
      IOLoop.current().run_sync(runner)
  
  .. testoutput::
  
      Waiting for event
      About to set the event
      Not waiting this time
      Done
class_docstr_tok: ["An","event","blocks","coroutines","until","its","internal","flag","is","set","to","True",".","Similar","to","`","threading.Event","`",".","A","coroutine","can","wait","for","an","event","to","be","set",".","Once","it","is","set",",","calls","to","``","yield","event.wait","(",")","``","will","not","block","unless","the","event","has","been","cleared",":","..","testcode",":",":","from","tornado","import","gen","from","tornado.ioloop","import","IOLoop","from","tornado.locks","import","Event","event","=","Event","(",")","@","gen.coroutine","def","waiter","(",")",":","print","(","``","Waiting","for","event","''",")","yield","event.wait","(",")","print","(","``","Not","waiting","this","time","''",")","yield","event.wait","(",")","print","(","``","Done","''",")","@","gen.coroutine","def","setter","(",")",":","print","(","``","About","to","set","the","event","''",")","event.set","(",")","@","gen.coroutine","def","runner","(",")",":","yield","[","waiter","(",")",",","setter","(",")","]","IOLoop.current","(",")",".run_sync","(","runner",")","..","testoutput",":",":","Waiting","for","event","About","to","set","the","event","Not","waiting","this","time","Done"]
code: def __init__(self):
      self._future = Future()
  
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 1 to create a new Event object from inherited base classes: object with example: obj = Event()