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
看了源码round timer 这块代码没看明白呢 #231
Comments
@lik0914 |
@Terry-Mao 有一个疑问,在go time.TImer源码里面已经实现了最小堆算法,只需要复用Timer即可。为什么该代码里面还需要实现一次类似最小堆算法呢?golang timer资料 |
因为有全局大锁争用,在密集连接发送时候,容易出现futex 争用,所以通过自己实现timer,然后减少对系统层面的timer调用 |
@Terry-Mao 首先感谢开源大作,已经拜读了,收益不少。有几个问题: 从tcpWriteProto开始的数据发送,没有设置发送超时,这样comet发送goroutine会被挂起,直到底层epoll接收到新的"通知事件",这里方便优化下加个超时吗? |
超时后什么处理?消息丢弃? |
如题,谁能给指教一下呢
The text was updated successfully, but these errors were encountered: