You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move cleanup logic from __aexit__() to disconnect() #139
We need to make it more intuitive for users to be able to add cleanup logic to sub-classes. Right now users need to override __aexit__ which has more complexity than disconnect() (extra arguments), which users usually don't need to care about.
Proposed solution
Move cleanup logic from __aexit__() to disconnect() and call disconnect() from __aexit__ (like we call connect() in __aenter__).
Document how users should add cleanup code overriding disconnect() (probably add an example with stopping broadcasters, being that one very common use case).
Activity