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-1.0.2.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for threadloop-1.0.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c90dbefab6ffbdba26afb4829d2a9df8275d13ac7dc58dccb0e279992679599 |
|
MD5 | 2ef9c5accaab19ee40b631c6de17b87d |
|
BLAKE2b-256 | dc1aecc8f9060b8b00f8a7edac9eb020357575d332a5ad9e32c3372c66a35f79 |