rivo / tview

Terminal UI library with rich, interactive widgets — written in Golang
MIT License
11.13k stars 575 forks source link

Add deadlock guard for Queue{Update,Event} #985

Closed diamondburned closed 6 months ago

diamondburned commented 6 months ago

This commit adds an atomic bool into Application that ensures that the user can never call QueueUpdate or QueueEvent in the main loop.

Previously, when the user does this, the application would deadlock and freeze forever. The user would often have to kill the process manually to get out of this state. Now, the application will panic, indicating the bug immediately.

diamondburned commented 6 months ago

This method is buggy and won't work as expected. Closing for now.