diff --git a/thread/cpu.go b/thread/cpu.go index 7942208..e398ceb 100644 --- a/thread/cpu.go +++ b/thread/cpu.go @@ -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