diff --git a/thread/cpu.go b/thread/cpu.go index d6417a7..6557b8d 100644 --- a/thread/cpu.go +++ b/thread/cpu.go @@ -16,12 +16,14 @@ var ( func init() { NumCPU = uint16(runtime.NumCPU()) - pflag.Uint16VarP(&CPUThread, "CPUThread", "t", 0, "prefork child id") - //Parse it in main // pflag.Parse() //parse at cxcputhread as it's very important, preparsing with another "flag" module before calling cxcputhread } +func DefineFlags() { + pflag.Uint16VarP(&CPUThread, "CPUThread", "t", 0, "prefork child id") +} + //cpu core 0 == 1 //cpu core 1 == 2 func SetCPUAffinity(cpu uint16) error {