Skip to content

goroutine pool对性能优化的疑问 #224

Answered by panjf2000
hugh-404 asked this question in Q&A
Discussion options

You must be logged in to vote

不只是复用,goroutine pool 还有一个主要的特性是限制,go原生的复用不会做数量的限制。还有就是 pool 其实是 worker 模式,相当于提前起动了一批 goroutines 在跑,不用每次都重新创建。

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@Minnull
Comment options

@panjf2000
Comment options

Answer selected by hugh-404
Comment options

You must be logged in to vote
2 replies
@panjf2000
Comment options

@panjf2000
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants