Merge pull request #711 from abperiasamy/yield-progressbar

yield CPU to progress bar builder
This commit is contained in:
Harshavardhana
2015-05-29 01:15:05 -07:00
+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 {