Tornado IOLoop Backed Concurrent Futures
Project description
Run Tornado Coroutines from Synchronous Python.
from threadloop import ThreadLoop
from tornado import gen
@gen.coroutine
def coroutine(greeting="Goodbye"):
yield gen.sleep(1)
raise gen.Return("%s World" % greeting)
with ThreadLoop() as threadloop:
future = threadloop.submit(coroutine, "Hello")
print future.result() # Hello World
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
threadloop-0.5.0.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for threadloop-0.5.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcc9d7d0f31435bee41045c0f5305810860b7c90bd341abff8ba89cfc2de9bd2 |
|
MD5 | d63e917db948ae47f1c1bc394773cf13 |
|
BLAKE2b-256 | 8e263e757baa032b0067298b7fb3217e28983393c7b187f92fd0009240737b7e |