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.3.2.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for threadloop-0.3.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b84fc782255bd8dd91fa52fed2474439354661312e09dc597490d2e6d431705a |
|
MD5 | ec6d640f8106f4bd3762a1c8d26f0412 |
|
BLAKE2b-256 | 18964fc9a9631ca5b42bf81bad574f7498fb64e494870a84ea7aed9a4a784558 |