I want to do some asynchronous HTTP-requests using the python library tornado (version 4.2). I can however not force a future to complete (using result()
) since I get an Exception: "DummyFuture does not support blocking for results".
I have python 3.4.3 therefore future support should be part of the standard library. The documentation of concurrent.py
says:
Tornado will use
concurrent.futures.Future
if it is available; otherwise it will use a compatible class defined in this module.
A minimal example for what I am trying to do is provided below:
from tornado.httpclient import AsyncHTTPClient;
future = AsyncHTTPClient().fetch("http://google.com")
future.result()
If I understand my problem correctly it occurs because the import of concurrent.futures.Future
somehow is not used. The relevant code in tornado appears to be in concurrent.py
but I am not really making progress on understanding where exactly the problem lies.