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.4.0.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for threadloop-0.4.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4c282c365da1f6ac9041ab0d5c11695b43dfbbcd3e9287e07e2617aefbc0bd4 |
|
MD5 | 3aec27871f0fd18c81a8a3acde362518 |
|
BLAKE2b-256 | 2b3c06cf1df594ebf169de1aba8c98816b5a4868ae26e71ffb27dad8d46fa957 |