3 ms·
Tornado has a well documented (and least complicated regarding gevent & twisted are concerned IMHO) but not well known/used "inline callback" with yields to sim
by twism 14y ago
Tornado has a well documented (and least complicated regarding gevent & twisted are concerned IMHO) but not well known/used "inline callback" with yields to simplify async code.
http://www.tornadoweb.org/en/branch2.3/gen.html http://www.tornadoweb.org/en/branch2.3/gen.html
From there, I made a wrapper to wrap potentially blocking logic in threads so I could have code that isn't async/non-blocking behave like it was.
https://gist.github.com/anonymous/5190528 https://gist.github.com/anonymous/5190528