tornadoweb/tornado — pull request #1075 by anton-ryzhov (2014-06-07 10:45:12+00:00)
Title: WSGIContainer in Executor

Nowadays only way to insert WSGI application into Tornado webserver is WSGIContainer, which runs application directly in event loop thread. It runs only one WSGI instance at once and totally hangs eventloop.

I've created wrapper which delegates WSGI invocation to ThreadPoolExecutor. Even one thread on pool keeps IOLoop in operation.
It doesn't work with ProcessPoolExecutor because of unserializable WSGI environment.

It's just proof of concept and lack of documentation and tests now. Is it useful for the project?

```python
with ThreadPoolExecutor(1) as executor:
container = tornado.wsgi.ExecutorWSGIContainer(simple_app, executor=executor)
http_server = tornado.httpserver.HTTPServer(container)
http_server.listen(8888)
tornado.ioloop.IOLoop.instance().start()
```