Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The ownership lifecycle, cancellation handling, caller integration, and regression coverage have no identified blocking issues.
No open issues 🎉
What changed in this PR
This PR makes software video teardown nonblocking while preserving attachment ownership until AVFoundation completes renderer removal.
Changes:
- Replaces synchronous waiting with a shared retirement task that retains the output and display layer through cancellation.
- Updates software playback callers and documents the requirement to await retirement before reusing a layer.
- Adds regression coverage for stopped clocks, duplicate removal, unrelated layers, and cancellation lifetime.
| File | Description |
|---|---|
| Tests/AetherEngineTests/AudioOutputRendererLifecycleTests.swift | Adds renderer retirement and lifetime regression tests. |
| Sources/AetherEngine/Native/SoftwarePlaybackHost.swift | Uses layer-based attachment and asynchronous retirement. |
| Sources/AetherEngine/Audio/AudioOutput.swift | Implements immediate removal with shared, lifetime-preserving retirement tasks. |
| docs/architecture.md | Documents retirement ownership and layer reuse requirements. |
| CHANGELOG.md | Records the nonblocking teardown fix. |
Review effort: Balanced
jonluca
force-pushed
the
fix/async-renderer-retirement
branch
from
October 25, 2026 18:28
693b502 to
1aeb4af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stopping software video currently waits on the main actor for an asynchronous synchronizer removal. Retire the output and display layer asynchronously so teardown stays responsive, while keeping both alive until AVFoundation finishes removing the renderer.
What changed
Test plan
swift test --disable-automatic-resolution --filter 'AudioOutput|Issue395RendererTimelineTests|Issue549RendererClockResumeTests|Sodalite104PausedFirstFrameTests|PublicAPIDocumentationTests'passes: 27 Swift tests plus 4 public API documentation tests.-warnings-as-errors.git diff --checkpass.Checklist
CHANGELOG.mdupdated