mirror of
https://github.com/rivo/tview.git
synced 2024-11-15 06:12:46 +00:00
remove some guards
This commit is contained in:
parent
2fd72c5654
commit
15ca0060cb
@ -297,7 +297,7 @@ func (a *Application) Run() error {
|
||||
defer wg.Done()
|
||||
|
||||
// check to see if the Application.Run is still valid
|
||||
for a.runContext.Err() == nil {
|
||||
for {
|
||||
a.RLock()
|
||||
screen := a.screen
|
||||
a.RUnlock()
|
||||
@ -349,7 +349,7 @@ func (a *Application) Run() error {
|
||||
// Start event loop.
|
||||
EventLoop:
|
||||
// check to see if the Application.Run is still valid
|
||||
for a.runContext.Err() == nil {
|
||||
for {
|
||||
select {
|
||||
// break loop when runContext complete
|
||||
case <-a.runContext.Done():
|
||||
@ -818,8 +818,7 @@ func (a *Application) GetFocus() Primitive {
|
||||
func (a *Application) QueueUpdate(f func()) *Application {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
d := 2
|
||||
d++
|
||||
// dealing with panic, as we can still get a closed channel
|
||||
}
|
||||
}()
|
||||
// check to see if the Application.Run is still valid
|
||||
|
Loading…
Reference in New Issue
Block a user