Skip to content

Instantly share code, notes, and snippets.

@yezihack
Last active December 15, 2022 01:42
Show Gist options
  • Save yezihack/edaae86c9aa7cb94f52f13262c9b8ddc to your computer and use it in GitHub Desktop.
Save yezihack/edaae86c9aa7cb94f52f13262c9b8ddc to your computer and use it in GitHub Desktop.
go 代码段
//马力全开,使用当前系统所有的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