Skip to content

Make streaming teardown destructor-safe - #9

Merged
trissim merged 2 commits into
mainfrom
fix/streaming-teardown-destructor-safe
Sep 22, 2026
Merged

trissim merged 2 commits into
mainfrom
fix/streaming-teardown-destructor-safe

Conversation

@trissim

@trissim trissim commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • move Fiji and Napari finalization onto the shared StreamingBackend ownership path
  • detach shared-memory, publisher, and context ownership before closing resources so repeated cleanup is idempotent
  • avoid module-global logger access during interpreter shutdown while retaining diagnostics for explicit cleanup
  • preserve fail-loud behavior for unexpected ownership errors during explicit cleanup

Motivation

OpenHCS Official30 teardown reproduced ignored finalizer exceptions after module globals had begun clearing:

AttributeError: 'NoneType' object has no attribute 'info'

The resource semantics already belong to StreamingBackend; subclass destructors and logger-dependent shutdown paths duplicated that authority and were unsafe during interpreter finalization.

Validation

  • 509 passed, 1 skipped across the full local PolyStore suite
  • 49 passed across focused streaming cleanup/identity/metadata/receiver/shared-memory/Napari coverage
  • Black and Ruff pass on the newly owned shared cleanup implementation and regression test
  • git diff --check passes

A dedicated version bump/release will follow only after this PR is green and merged; no published version is reused.

@trissim
trissim merged commit 141554e into main Sep 22, 2026
11 checks passed
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