mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[PR #1105] [CLOSED] Fix race conditions in TreeView #1128
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#1128
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rivo/tview/pull/1105
Author: @roelvandergoot
Created: 7/26/2025
Status: ❌ Closed
Base:
master← Head:roel/TreeView📝 Commits (1)
6f22d69Fix race conditions in TreeView📊 Changes
1 file changed (+96 additions, -2 deletions)
View changed files
📝
treeview.go(+96 -2)📄 Description
When you:
1.Represent a directory tree as a
TreeView,2. Use a state machine go-routine per leaf
TreeNode, and3. Append the current state name of the state machine to the
TreeNode's usingTreeNode.SetText(),a race condition exists between
TreeNode.SetText()andTreeView.Draw()You can't solve the race condition by embedding
rivo.TreeViewandrivo.TreeNodes in your ownTreeViewandTreeNodes. Hence this pull request.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.