def run_with_twisted(self, **options):
        """Run with twisted."""
        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)
Run with twisted.