Skip to content

Commit

Permalink
Update cpu.go
Browse files Browse the repository at this point in the history
  • Loading branch information
kolinfluence authored Mar 15, 2024
1 parent 91f5cb5 commit 3350bf1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions thread/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ var (
)

// This function should be called from the main package or higher-level logic to define flags.
func DefineFlags() {
pflag.Uint16VarP(&CPUThread, "CPUThread", "t", 0, "prefork child id")
}

func init() {
NumCPU = uint16(runtime.NumCPU())
pflag.Uint16VarP(&CPUThread, "CPUThread", "t", 0, "prefork child id")
pflag.Parse() //parse at cxcputhread as it's very important, preparsing with another "flag" module before calling cxcputhread
}

//cpu core 0 == 1
Expand Down

0 comments on commit 3350bf1

Please sign in to comment.