mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #134] Bug: Suspend() doesn't work from goroutine #105
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#105
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 @kvj on GitHub (Jun 20, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/134
I'm trying to get user input using
fmt.Scanf()by temporarily suspending tview/tcell application and later resuming it. IfSuspend()is called from same thread withRun()/KeyboardInterceptor()- everything works, I can get user input, but application hangs (Run()finishes) when goroutine is used. Following sample code demonstrates the issue:If I call
doInput(app)- everything is OK, but when I change it togo doInput(app)- application hangs@kvj commented on GitHub (Jun 20, 2018):
I believe there's an issue with mutex
Lock()/Unlock()calls, event loop is terminated here: https://github.com/rivo/tview/blob/master/application.go#L113@rivo commented on GitHub (Jun 28, 2018):
I've merged your PR so this issue is closed now.