Add more docs about Future exception logging.
Simplify some Future internals. Add enough magic calls to Future.exception that the test suite passes without warning (at least on py34)
Add gen.with_timeout wrapper.
Since it is no longer possible for TracebackFuture to modify concurrent.futures.Future instead, there is no need for separate classes. Removing the subclass speeds things up a bit by removing a level of indirection. Also microoptimized a few methods of Future.
This improves performance and provides more consistent semantics (independent of the presence or absence of the concurrent.futures package). The parts of Tornado that accept Futures will accept both Tornado's thread-unsafe Futures and the thread-safe concurrent.futures.Future.
This fixes a thread leak when running the test suite with ThreadedResolver.
This allows for better tracebacks when using Futures on Python 2.
… to client callback.
… callback. Functions and decorators that take an optional callback and return a future (return_future, gen.concurrent, and run_executor) no longer pass the Future object to the callback. This results in somewhat less flexible error handling, but is more consistent with prevailing practice without Futures.
… Future. Add a test for the UnboundLocal error seen here and remove the no-longer-needed initialization. I'm not 100% sure we want to do both (due to the risk of callback-doubling), but the old way where the caller saw one error and the future resolved to a different error was clearly incorrect, and leaving the future unresolved doesn't seem right either.