This website works better with JavaScript.
Home
Help
Sign In
sm
/
cs
Watch
1
Star
0
Fork
1
Code
Issues
1
Pull Requests
0
Activity
Browse Source
added ngo flag and default worker value (NumCpu)
pull/4/head
Derek McQuay
4 years ago
parent
8d0ecfdc7f
commit
b11c4701c3
No known key found for this signature in database
GPG Key ID:
92A7BC0C86B0B91A
2 changed files
with
3 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-2
check.go
+2
-0
main.go
+ 1
- 2
check.go
View File
@ -94,8 +94,7 @@ func check(files []string) chan error {
results
:=
[
]
<-
chan
error
{
}
workers
:=
32
for
w
:=
0
;
w
<
workers
;
w
++
{
for
w
:=
0
;
w
<
*
ngo
;
w
++
{
results
=
append
(
results
,
compute
(
jobs
)
)
}
+ 2
- 0
main.go
View File
@ -9,10 +9,12 @@ import (
"fmt"
"io"
"os"
"runtime"
)
var
algo
=
flag
.
String
(
"a"
,
"sha1"
,
"algorithm to use"
)
var
mode
=
flag
.
Bool
(
"c"
,
false
,
"check"
)
var
ngo
=
flag
.
Int
(
"n"
,
runtime
.
NumCPU
(
)
,
"number of goroutines"
)
func
main
(
)
{
flag
.
Parse
(
)
Write
Preview
Loading…
Cancel
Save