Skip to content

Make container disposal idempotent - #288

Open
sogav21 wants to merge 1 commit into
microsoft:masterfrom
sogav21:fix/285-dispose-once
Open

sogav21 wants to merge 1 commit into
microsoft:masterfrom
sogav21:fix/285-dispose-once

Conversation

@sogav21

@sogav21 sogav21 commented Nov 4, 2026

Copy link
Copy Markdown

Repeated calls to dispose() could run the same teardown more than once. The container now starts teardown once and shares the result with sequential and concurrent callers. A teardown callback that immediately calls back into dispose() can return without waiting on itself.

The regression tests cover repeated and concurrent calls, synchronous and asynchronous errors, and immediate reentry. All 138 tests and all build targets passed.

Refs #285 (repeated disposal).

@sogav21

sogav21 commented Nov 4, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant