go语言协程问题

hzsunsong · 2017-08-04 02:01:50 · 4180 次点击

go中的一些最大限制: sched.maxmcount = 10000 // maximum number of m's allowed (or die)

// 最大线程数 const ( // The max value of GOMAXPROCS. // There are no fundamental restrictions on the value. _MaxGomaxprocs = 1 << 10 )

新增goroutine 的限制条件是能不能获取到足够大小的stack size。

#24
更多评论

数量依赖系统资源,比如内存啊之类的,没有其他的限制。

#1

比如8G的内存,可以创建多少个协程?

#2