Closed cstruct closed 3 years ago
Calling self.cancel_task in __aexit__ was never safe when having pending tasks. Since self.cancel_tasks modifies self._pending we need to copy the set and iterate over that snapshot.
self.cancel_task
__aexit__
self.cancel_tasks
self._pending
This fixes vxgmichel/aiostream#73
Thanks for the PR! #75 is taking over now :)
Calling
self.cancel_task
in__aexit__
was never safe when having pending tasks. Sinceself.cancel_tasks
modifiesself._pending
we need to copy the set and iterate over that snapshot.This fixes vxgmichel/aiostream#73