aiojobs
aiojobs copied to clipboard
Remove redundant .done() call
I was just comparing the logic here with some similar code that I have written.
One difference I noticed is that there is a redundant check for .done().
.cancel() is safe to call, and actually makes the same check internally, therefore this code ends up making the check twice.
https://github.com/python/cpython/blob/3.6/Lib/asyncio/tasks.py#L152