]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Doc updates from Zhigang Wang
authorBen Darnell <ben@bendarnell.com>
Wed, 12 Jun 2013 02:11:49 +0000 (22:11 -0400)
committerBen Darnell <ben@bendarnell.com>
Wed, 12 Jun 2013 02:11:49 +0000 (22:11 -0400)
tornado/gen.py

index cbff9ff6e48da3cf3c816c0f4b0c574a8ac3735a..92b7458ed959695c61a7d5d215bc03e33da730e6 100644 (file)
@@ -19,7 +19,6 @@ For example, the following asynchronous handler::
 could be written with ``gen`` as::
 
     class GenAsyncHandler(RequestHandler):
-        @asynchronous
         @gen.coroutine
         def get(self):
             http_client = AsyncHTTPClient()
@@ -166,13 +165,7 @@ def coroutine(func):
     """Decorator for asynchronous generators.
 
     Any generator that yields objects from this module must be wrapped
-    in either this decorator or `engine`.  These decorators only work
-    on functions that are already asynchronous.  For
-    `~tornado.web.RequestHandler` :ref:`HTTP verb methods <verbs>` methods, this
-    means that both the `tornado.web.asynchronous` and
-    `tornado.gen.coroutine` decorators must be used (for proper
-    exception handling, ``asynchronous`` should come before
-    ``gen.coroutine``).
+    in either this decorator or `engine`.
 
     Coroutines may "return" by raising the special exception
     `Return(value) <Return>`.  In Python 3.3+, it is also possible for