Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcp长链接,一个connection一个goroutine会不会太暴力 #64

Closed
yale8848 opened this issue Jan 8, 2018 · 2 comments
Closed

Comments

@yale8848
Copy link

yale8848 commented Jan 8, 2018

我这边想实现一个推送服务器,想用tcp长链接实现。如果一个connection一个goroutine,系统会不会出现最终因为大量goroutine而造成GC超长。如果不这样实现,还有什么好的方式吗?谢谢了

@yale8848 yale8848 changed the title tcp长链,一个connection一个goroutine会不会太暴力 tcp长链接,一个connection一个goroutine会不会太暴力 Jan 8, 2018
@bg5sbk
Copy link
Contributor

bg5sbk commented Jan 9, 2018

goroutine通常不会有啥大问题,想极端性能可以考虑用C、C++、Rust,如果必须用Go,可以试试 https://github.com/tidwall/evio 这个库

@yale8848
Copy link
Author

yale8848 commented Jan 9, 2018

ok,3ks

@yale8848 yale8848 closed this as completed Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants