Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Call disconnect on async context exit - #295

Open
llucax wants to merge 1 commit into
frequenz-floss:v0.x.xfrom
llucax:disconnect-on-exit
Open

llucax wants to merge 1 commit into
frequenz-floss:v0.x.xfrom
llucax:disconnect-on-exit

Conversation

@llucax

@llucax llucax commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Subclasses can now stop stream broadcasters and release other resources in disconnect() for both explicit disconnect and async with exit. The release notes explain how to migrate cleanup from an existing __aexit__() override.

Fixes #139.

Let subclasses release resources in disconnect() regardless of how the
caller closes the client. Close the channel without a grace period as
gRPC does on context exit, and let exceptions from the block propagate.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
@github-actions github-actions Bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:code Affects the code in general labels Nov 30, 2026
@llucax llucax self-assigned this Nov 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:code Affects the code in general part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move cleanup logic from __aexit__() to disconnect()

1 participant