code: def run_with_twisted(self, **options):
          
          from twisted.internet import reactor
          from twisted.python import log
          import flask_twisted
  
          twisted = flask_twisted.Twisted(self.app)
          if self.threads:
              reactor.suggestThreadPoolSize(self.threads)
          if self.log_level:
              log.startLogging(sys.stderr)
          twisted.run(host=self.host, port=self.port, debug=self.debug, **options)
docs: Run with twisted.