rivo / tview

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

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

Closed diamondburned closed 4 months ago

diamondburned commented 4 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 4 months ago

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