Skip to content

mux: release the player lock during source Seek - #328

Open
kumagi wants to merge 1 commit into
ebitengine:mainfrom
kumagi:codex/mux-seek-lock-scope
Open

kumagi wants to merge 1 commit into
ebitengine:mainfrom
kumagi:codex/mux-seek-lock-scope

Conversation

@kumagi

@kumagi kumagi commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

What issue is this addressing?

None

What type of issue is this addressing?

bug

What this PR does | solves

A source that blocks in Seek holds the player mutex needed by mixing and player queries. Release that mutex around the external Seek while serializing source reads, seeks and state-changing player controls. Preserve buffer invalidation and playback restoration; cleanup waits at the outer Close rather than the internal error-close path.

Validation: Native macOS arm64 internal race tests passed, including shuffle/count=3 and the final blocked-Read regression. The new mixer/getter regression fails on the actual base and passes after the fix. Tests cover controls, two seeks, source Read exclusion, stale Read results, errors and panics. Native build and Windows amd64 cross-build passed. State-changing controls still wait for a blocked Seek; this fixes mixer/query progress.

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