runtime

runtime

放弃cpu执行权限    runtime.Gosched()

返回cpu核数   runtime.NumCPU()

返回当前进程的goroutine线程数   runtime.NumGoroutine()

函数用于终止当前的goroutine,单defer函数将会继续被调用。  runtime.Goexit()

你可能感兴趣的:(runtime)