How to find how many logical processors used by current process in Go

1 Answer

0 votes
package main

import (
	"fmt"
	"runtime"
)

func main() {
	fmt.Println(runtime.NumCPU())
}



/*
run:

4

*/

 



answered Aug 8, 2020 by avibootz
...