-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
part:codeAffects the code in generalAffects the code in generalpart:docsAffects the documentationAffects the documentationpriority:highAddress this as soon as possibleAddress this as soon as possibletype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
Milestone
Description
What's needed?
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__()
todisconnect()
and calldisconnect()
from__aexit__
(like we callconnect()
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).
Use cases
- Stopping and cleaning up broadcasters.
Metadata
Metadata
Assignees
Labels
part:codeAffects the code in generalAffects the code in generalpart:docsAffects the documentationAffects the documentationpriority:highAddress this as soon as possibleAddress this as soon as possibletype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users