From 683d422004ddd11bdecc0a3bfff03ce413651bcb Mon Sep 17 00:00:00 2001 From: Andrew Glinskiy Date: Thu, 18 Dec 2014 16:38:20 +0200 Subject: [PATCH] Fixed error that the web.asynchronous doesn't complete python3 concurrent.Futures --- tornado/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.47.2