mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[PR #665] [MERGED] Fix deadlock in SetText #1008
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#1008
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/665
Author: @SamWhited
Created: 10/29/2021
Status: ✅ Merged
Merged: 10/29/2021
Merged by: @rivo
Base:
master← Head:fix_crash📝 Commits (1)
d0d3379Fix deadlock in SetText📊 Changes
1 file changed (+4 additions, -4 deletions)
View changed files
📝
textview.go(+4 -4)📄 Description
I realized right as I saw the email that the batch stuff had been merged that my change to the locking in SetText would obviously cause a deadlock (we aquire the lock, then the Write method is called which also tries to aquire the lock).
If you'd permit me, I'd like to write tests for some of the functions in this library, it could have prevented this being merged in the first place if I'd written some tests about it. While you consider it though I've pushed up this fix quickly that at least lets SetText be usable again.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.