]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Document the attributes required by @run_on_executor.
authorBen Darnell <ben@bendarnell.com>
Sun, 1 Dec 2013 20:04:02 +0000 (15:04 -0500)
committerBen Darnell <ben@bendarnell.com>
Sun, 1 Dec 2013 20:04:02 +0000 (15:04 -0500)
Closes #933.

tornado/concurrent.py

index 9a10905e936bd19d36e2d437d87f23981522fd98..a9002b16a3fcf6f0edca247dbb955799324d7235 100644 (file)
@@ -151,6 +151,9 @@ def run_on_executor(fn):
 
     The decorated method may be called with a ``callback`` keyword
     argument and returns a future.
+
+    This decorator should be used only on methods of objects with attributes
+    ``executor`` and ``io_loop``.
     """
     @functools.wraps(fn)
     def wrapper(self, *args, **kwargs):