]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Fixed error that the web.asynchronous doesn't complete python3 concurrent.Futures 1281/head
authorAndrew Glinskiy <nordaux@gmail.com>
Thu, 18 Dec 2014 14:38:20 +0000 (16:38 +0200)
committerAndrew Glinskiy <nordaux@gmail.com>
Thu, 18 Dec 2014 14:38:20 +0000 (16:38 +0200)
tornado/web.py

index b85b55debbde19d06375306903ea476b8c5ee56d..2d1dac0fd23f7fdd11707d886596584ef350560e 100644 (file)
@@ -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,