@@ -0,0 +1,1366 @@
+import tornado.gen%0Afrom tornado.gen import *%0A%0A%0Adef coroutine(func, replace_callback=True):%0A    %22%22%22Decorator for asynchronous generators.%0A%0A    Any generator that yields objects from this module must be wrapped%0A    in either this decorator or %60engine%60.%0A%0A    Coroutines may %22return%22 by raising the special exception%0A    %60Return(value) %3CReturn%3E%60.  In Python 3.3+, it is also possible for%0A    the function to simply use the %60%60return value%60%60 statement (prior to%0A    Python 3.3 generators were not allowed to also return values).%0A    In all versions of Python a coroutine that simply wishes to exit%0A    early may use the %60%60return%60%60 statement without a value.%0A%0A    Functions with this decorator return a %60.Future%60.  Additionally,%0A    they may be called with a %60%60callback%60%60 keyword argument, which%0A    will be invoked with the future's result when it resolves.  If the%0A    coroutine fails, the callback will not be run and an exception%0A    will be raised into the surrounding %60.StackContext%60.  The%0A    %60%60callback%60%60 argument is not visible inside the decorated%0A    function; it is handled by the decorator itself.%0A%0A    From the caller's perspective, %60%60@gen.coroutine%60%60 is similar to%0A    the combination of %60%60@return_future%60%60 and %60%60@gen.engine%60%60.%0A    %22%22%22%0A    re = tornado.gen._make_coroutine_wrapper(func, replace_callback=True)%0A    re._rw_wrapped_function = func%0A    return re

add rw.gen (WIP, will probably disappear again)