Skip to content

Instantly share code, notes, and snippets.

View jkp's full-sized avatar

Jamie Kirkpatrick jkp

View GitHub Profile
@jkp
jkp / wsgi_async.py
Created November 22, 2009 13:54
Experimental code to add async functionality to WSGI applications running under Tornado
#!/usr/bin/env python
#
# Jamie Kirkpatrick, November 2009. <jkp@kirkconsulting.co.uk>
# Released under the BSD license.
#
"""
Experimental code to add asyncronous functionality to WSGI applications
running under the Tornado webserver. Uses greenlet to spin micro-threads
which can be suspended and resumed within a single thread as required.