code: def awaitTermination(self, timeout=None):
          
  
          if timeout is not None:
              IOLoop.current().call_later(timeout, self.stop)
  
          IOLoop.current().start()
          IOLoop.clear_current()
docs: Wait for context to stop.
  
          :param float timeout: in seconds