title: Is Tornado really non-blocking?
body: <p>Tornado advertises itself as "a relatively simple, <strong>non-blocking</strong> web server framework" and was designed to solve the C10k problem. However, looking at their database wrapper, which wraps MySQLdb, I came across the following piece of code:</p>
  
  <pre><code>def _execute(self, cursor, query, parameters):
      try:
          return cursor.execute(query, parameters)
      except OperationalError:
          logging.error("Error connecting to MySQL on %s", self.host)
          self.close()
          raise
  </code></pre>
  
  <p>As far as I know calls to the MySQLdb, which is built on top of <code>libmysqlclient</code>, <strong>are blocking.</strong></p>
  
  <p>Am I right in thinking that a long-running query would render the entire Tornado server unresponsive until it finishes or is there magic on the code?</p>