projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc855b7
)
asyncio, Tulip issue 158: Task._step() now also sets self to None if an
author
Victor Stinner
<victor.stinner@gmail.com>
Tue, 4 Mar 2014 22:07:08 +0000
(23:07 +0100)
committer
Victor Stinner
<victor.stinner@gmail.com>
Tue, 4 Mar 2014 22:07:08 +0000
(23:07 +0100)
exception is raised. self is set to None to break a reference cycle.
Lib/asyncio/tasks.py
patch
|
blob
|
history
diff --git
a/Lib/asyncio/tasks.py
b/Lib/asyncio/tasks.py
index 19fa654edbed1355d29f89e60bd486d24ade2760..0967e7e62839fa2473e43efce2f92e738325db5a 100644
(file)
--- a/
Lib/asyncio/tasks.py
+++ b/
Lib/asyncio/tasks.py
@@
-325,7
+325,7
@@
class Task(futures.Future):
'Task got bad yield: {!r}'.format(result)))
finally:
self.__class__._current_tasks.pop(self._loop)
- self = None
+ self = None # Needed to break cycles when an exception occurs.
def _wakeup(self, future):
try: