aiojobs icon indicating copy to clipboard operation
aiojobs copied to clipboard

Remove redundant .done() call

Open Dreamsorcerer opened this issue 5 years ago • 0 comments

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

Dreamsorcerer avatar Dec 16 '20 23:12 Dreamsorcerer