Alexander Hartl <alexander.ha...@tuwien.ac.at> added the comment:

I just found this PR when a task of mine spontaneously crashed with a "Task was 
destroyed but it is pending" in the middle of program execution.

I think the warning should be added to `loop.create_task()`, too. Not sure if 
`loop.call_later()` and `loop.call_at()` are also affected?

I think it would be a good idea to add the fire-and-forget example that @bernat 
gave. At the moment, stackoverflow is full of suggestions to just use 
`create_task()` in this case, ignoring the return value. Actually, I think it 
is a true shortcoming that asyncio doesn't provide a fire-and forget 
functionality by itself.

----------
nosy: +alexhartl

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44665>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to