Last active
December 15, 2022 01:42
-
-
Save yezihack/edaae86c9aa7cb94f52f13262c9b8ddc to your computer and use it in GitHub Desktop.
go 代码段
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//马力全开,使用当前系统所有的CPU | |
numCPUs := runtime.NumCPU() | |
runtime.GOMAXPROCS(numCPUs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment