From: Andrew Glinskiy Date: Thu, 18 Dec 2014 14:38:20 +0000 (+0200) Subject: Fixed error that the web.asynchronous doesn't complete python3 concurrent.Futures X-Git-Tag: v4.1.0b1~47^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1281%2Fhead;p=thirdparty%2Ftornado.git Fixed error that the web.asynchronous doesn't complete python3 concurrent.Futures --- diff --git a/tornado/web.py b/tornado/web.py index b85b55deb..2d1dac0fd 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -1478,7 +1478,7 @@ def asynchronous(method): with stack_context.ExceptionStackContext( self._stack_context_handle_exception): result = method(self, *args, **kwargs) - if isinstance(result, Future): + if is_future(result): # If @asynchronous is used with @gen.coroutine, (but # not @gen.engine), we can automatically finish the # request when the future resolves. Additionally,