Gosched if nothing to do
Vladimir Bauer
8 years ago
1 changed file(s) with
2 addition(s)
and
0 deletion(s)
.
Raw diff
Collapse all
Expand all
+2
-0
progress.go
less
more
2
2
import (
3
3
"io"
4
4
"os"
5
"runtime"
5
6
"sync"
6
7
"time"
7
8
193
194
case <-conf.ticker.C:
194
195
numBars := len(conf.bars)
195
196
if numBars == 0 {
197
runtime.Gosched()
196
198
break
197
199
}
198
200