Skip to content

Commit

Permalink
Add a warning label to WSGIContainer.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarnell committed Feb 23, 2014
1 parent 559514d commit f55f9d0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tornado/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ def request_time(self):
class WSGIContainer(object):
r"""Makes a WSGI-compatible function runnable on Tornado's HTTP server.
.. warning::
WSGI is a *synchronous* interface, while Tornado's concurrency model
is based on single-threaded asynchronous execution. This means that
running a WSGI app with Tornado's `WSGIContainer` is *less scalable*
than running the same app in a multi-threaded WSGI server like
``gunicorn`` or ``uwsgi``. Use `WSGIContainer` only when there are
benefits to combining Tornado and WSGI in the same process that
outweigh the reduced scalability.
Wrap a WSGI function in a `WSGIContainer` and pass it to `.HTTPServer` to
run it. For example::
Expand Down

0 comments on commit f55f9d0

Please sign in to comment.