|
|
@ -96,6 +96,7 @@ func main() {
|
|
|
|
if th, err := strconv.Atoi(ar[i+1]); err ==nil {
|
|
|
|
if th, err := strconv.Atoi(ar[i+1]); err ==nil {
|
|
|
|
maxThreads = th
|
|
|
|
maxThreads = th
|
|
|
|
ignore = true
|
|
|
|
ignore = true
|
|
|
|
|
|
|
|
continue
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
fmt.Printf("Bad threads flag");
|
|
|
|
fmt.Printf("Bad threads flag");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -111,7 +112,7 @@ func main() {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
var sem chan bool
|
|
|
|
var sem chan bool
|
|
|
|
|
|
|
|
|
|
|
|
if maxThreads >0 {
|
|
|
|
if maxThreads > 1 {
|
|
|
|
sem = make(chan bool, maxThreads)
|
|
|
|
sem = make(chan bool, maxThreads)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
sem = make(chan bool)
|
|
|
|
sem = make(chan bool)
|
|
|
|