runtime

2019-02-13  本文已影响0人  遇见你_17be

runtime

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

返回cpu核数   runtime.NumCPU()

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

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

上一篇 下一篇

猜你喜欢

热点阅读