summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Bassi <calebjbassi@gmail.com>2018-04-13 09:45:24 -0700
committerCaleb Bassi <calebjbassi@gmail.com>2018-04-13 09:45:24 -0700
commitb5604e62797fa0019a800154c79072d42b4e4cb1 (patch)
treee57368ee92d3de755509d75777b1315592e8e2f8
parent3043e6bea25cd581b563d6cf92e9f044c2832d4f (diff)
Cleanup widget initialization1.2.12
-rw-r--r--main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.go b/main.go
index 3372f0d..2e308e3 100644
--- a/main.go
+++ b/main.go
@@ -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
@@ -191,6 +189,7 @@ func widgetColors() {
}
}
+// load widgets asynchronously but wait till they are all finished
func initWidgets() {
wg.Add(widgetCount)