docs(drain): document the per-pane lock hierarchy and no-nesting invariant#52
Open
roramirez wants to merge 1 commit into
Open
docs(drain): document the per-pane lock hierarchy and no-nesting invariant#52roramirez wants to merge 1 commit into
roramirez wants to merge 1 commit into
Conversation
…riant The parser thread and the main thread share three per-pane locks (grid, log_file, pending_resize) with no written acquisition rule, so a future change could introduce inconsistent ordering and risk deadlock. Document the primary invariant (never hold more than one at a time; every site acquires, works, and releases before the next) and the canonical order for any future nesting (log_file > grid > pending_resize), and add a cross-reference at the pane_ops resize site. Audit of drain.rs, render_ops.rs, and pane_ops.rs found no violations — no code reorder needed.
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.
What
The parser thread and the main thread share three per-pane locks (
grid,log_file,pending_resize) with no written acquisition rule, so a future change could introduce inconsistent ordering and risk a deadlock.Changes
drain.rsthe primary invariant (never hold more than one at a time; every site acquires, works, and releases before the next) and the canonical order for any future nesting (log_file>grid>pending_resize).pane_ops.rs.drain.rs,render_ops.rs, andpane_ops.rs: no violations found, no code reorder needed.Card
plan-todo/05-hardening-orden-locks.md