Skip to content

fix: eliminate data races and reduce lock scope - #15

Merged
bosiakov merged 2 commits into
mainfrom
fix/ui-thread-safety-and-lock-scope
Mar 21, 2026
Merged

fix: eliminate data races and reduce lock scope#15
bosiakov merged 2 commits into
mainfrom
fix/ui-thread-safety-and-lock-scope

Conversation

@bosiakov

Copy link
Copy Markdown
Contributor
  • Replace MetadataCache clear() with map reassignment (copy-on-write)
  • Snapshot MetadataCache and CurrentQuery under RLock in command list
  • Deliver ProcessHotkeyUpdate/ProcessAutostartUpdate results via buffered channels instead of writing UI-thread state from goroutines
  • Use closure-captured commands snapshot in click handler instead of re-reading DisplayCommands under RLock
  • Release RLock before linear scans in navigateTreeWithSearch and syncTreeToCommandSelection (copy-on-write makes holding unnecessary)
  • Replace inline height cache resize with resizeHeightCache call

@bosiakov
bosiakov merged commit a2b84c0 into main Mar 21, 2026
1 check passed
@bosiakov
bosiakov deleted the fix/ui-thread-safety-and-lock-scope branch March 21, 2026 12:25
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