Fix copy cmd when the host has only one CPU core

This commit is contained in:
Anis Elleuch
2015-05-16 23:16:40 +01:00
parent 3c8643a335
commit f8b98893bc
+1 -1
View File
@@ -110,7 +110,7 @@ func runCopyCmd(ctx *cli.Context) {
}
}(sourceURLs, targetURL)
var cpQueue = make(chan bool, runtime.NumCPU()-1)
var cpQueue = make(chan bool, intMax(runtime.NumCPU()-1, 1))
var wg sync.WaitGroup
for cpURLs := range prepareCopyURLs(sourceURLs, targetURL) {