diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-12-04 23:08:37 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-12-04 23:08:37 +0100 |
commit | d5ea5d528a5bd356b1204ba8ac2bb9d27be0ac02 (patch) | |
tree | 57d44af2d2e27d4da49dad23be9b4cfef86afa71 /Lib/asyncio/tasks.py | |
parent | 74aee426c166241c8c0f2a64d22e0b4b9e53443b (diff) | |
parent | e80bf0d4a996b3ecda2c2f3cbab10037b9fdcd5e (diff) | |
download | cpython-git-d5ea5d528a5bd356b1204ba8ac2bb9d27be0ac02.tar.gz |
Merge 3.4 (asyncio)
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r-- | Lib/asyncio/tasks.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index a2128c5545..9aebffdaba 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -41,6 +41,10 @@ class Task(futures.Future): # all running event loops. {EventLoop: Task} _current_tasks = {} + # If False, don't log a message if the task is destroyed whereas its + # status is still pending + _log_destroy_pending = True + @classmethod def current_task(cls, loop=None): """Return the currently running task in an event loop or None. @@ -73,9 +77,6 @@ class Task(futures.Future): self._must_cancel = False self._loop.call_soon(self._step) self.__class__._all_tasks.add(self) - # If False, don't log a message if the task is destroyed whereas its - # status is still pending - self._log_destroy_pending = True # On Python 3.3 or older, objects with a destructor that are part of a # reference cycle are never destroyed. That's not the case any more on |