Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Commit

Permalink
Cleanup widget initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbassi committed Apr 13, 2018
1 parent 3043e6b commit b5604e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ var (
helpToggled = make(chan bool, 1)
helpVisible = false

// proc widget takes longer to load, wait to render until it loads data
widgetsLoaded = make(chan bool, 1)
wg sync.WaitGroup
wg sync.WaitGroup
// used to render the proc widget whenever a key is pressed for it
keyPressed = make(chan bool, 1)
// used to render cpu and mem when zoom has changed
Expand Down Expand Up @@ -191,6 +189,7 @@ func widgetColors() {
}
}

// load widgets asynchronously but wait till they are all finished
func initWidgets() {
wg.Add(widgetCount)

Expand Down

0 comments on commit b5604e6

Please sign in to comment.