title: Multithreading Falcon in Python
body: <p>I'm creating a REST API for an application using <a href="https://falcon.readthedocs.io/en/stable/index.html" rel="nofollow noreferrer">Falcon</a>. When launching two or more requests to the API on different endpoints, there's no multi-threaded execution (One request has to be finished to execute the next one)</p>
  
  <p>The problem is coming from a POST endpoint that executes a complex machine learning process (takes dozen of seconds to finish) and the whole API is blocked when the process is being executed, because it waits for the process to be completed to return some results. </p>
  
  <p>I'm using wsgiref simple_server to serve the requests:</p>
  
  <pre><code>if __name__ == '__main__':
      httpd = simple_server.make_server('127.0.0.1', 8000, app)
      httpd.serve_forever()
  </code></pre>
  
  <p>Is there any way to make the execution parallel to serve multiple requests in the same time.</p>