mirror of
https://github.com/mum4k/termdash.git
synced 2026-04-27 03:15:55 +03:00
[GH-ISSUE #205] Triggering dynamic layout change with a widget may lead to a deadlock #116
Labels
No labels
bug
cleanup
enhancement
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/termdash#116
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?
Originally created by @mum4k on GitHub (May 14, 2019).
Original GitHub issue: https://github.com/mum4k/termdash/issues/205
Originally assigned to: @mum4k on GitHub.
Thanks to @keithknott26 for reporting this.
The deadlock can occur when a button widget is configured so that its callback calls the Update method on the container API:
github.com/mum4k/termdash@0e5242ca6f/container/container.go (L228)If there is a concurrent Redraw happening at the same time, the container is mutex locked. The rest is a race, the deadlock occurs in this sequence of events:
Proof in the traceback below.
Button attempting to call Update:*
Termdash attempting to redraw the button:
@mum4k commented on GitHub (May 14, 2019):
@keithknott26, when you get a chance, please build from the 205-deadlock branch and verify that this indeed fixes the problem.