From: Victor Stinner Date: Tue, 2 Dec 2014 16:57:04 +0000 (+0100) Subject: Closes #22475: asyncio doc, fix Task.get_stack() doc X-Git-Tag: v3.4.3rc1~274 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d87de8358285cdd793e88e037024d143c3e47563;p=thirdparty%2FPython%2Fcpython.git Closes #22475: asyncio doc, fix Task.get_stack() doc --- diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index 0d94cb8bdbaf..3008c86709df 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -413,7 +413,7 @@ Task Return the list of stack frames for this task's coroutine. - If the coroutine is active, this returns the stack where it is suspended. + If the coroutine is not done, this returns the stack where it is suspended. If the coroutine has completed successfully or was cancelled, this returns an empty list. If the coroutine was terminated by an exception, this returns the list of traceback frames. diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index e0738021e03c..a2128c5545d2 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -109,7 +109,7 @@ class Task(futures.Future): def get_stack(self, *, limit=None): """Return the list of stack frames for this task's coroutine. - If the coroutine is active, this returns the stack where it is + If the coroutine is not done, this returns the stack where it is suspended. If the coroutine has completed successfully or was cancelled, this returns an empty list. If the coroutine was terminated by an exception, this returns the list of traceback