yield CPU to progress bar builder

This commit is contained in:
Anand Babu (AB) Periasamy
2015-05-29 01:03:26 -07:00
parent 3103411e6d
commit 690bb2d705
+3
View File
@@ -130,6 +130,9 @@ func doCopyCmd(sourceURLs []string, targetURL string, bar barSend) <-chan error
errCh <- cpURLs.Error
continue
}
runtime.Gosched() // Yield more CPU time to progress-bar builder.
cpQueue <- true // Wait for existing pool to drain.
wg.Add(1)
if !globalQuietFlag {