Explorar o código

lesser go procs...

willie %!s(int64=5) %!d(string=hai) anos
pai
achega
b07b1dd33f
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      GoHash.go

+ 3 - 1
GoHash.go

@@ -44,7 +44,7 @@ func init() {
 
 func main() {
 	log.Println("starting GoHash")
-	runtime.GOMAXPROCS(5)
+	runtime.GOMAXPROCS(2)
 	hashes = make(map[string]Fdhashes)
 	flag.Parse()
 	myFile := flag.Arg(0)
@@ -125,7 +125,9 @@ func outputHash(fileStr string) {
 		doHash = true
 	}
 	if doHash {
+		log.Printf("starting %s\n", fileStr)
 		hash := getSha256Hash(fileStr)
+		log.Printf("ready %s\n", fileStr)
 		mu.Lock()
 		lock1.Lock()
 		hashFile.Hashes[fileName] = hash