Closed ghost closed 2 years ago
这边确实有问题,遗漏了Retrieve(n) , 感谢指出🙏
https://github.com/Allenxuxu/gev/blob/9262fa12b35a46747cf40ee5cd43efa9187adf85/protocol.go#L32
还想问下,这个拷贝到userBuffer的数据,外面使用的时候,是如何知道其有效长度的呢?
https://github.com/Allenxuxu/gev/blob/9262fa12b35a46747cf40ee5cd43efa9187adf85/protocol.go#L32
还想问下,这个拷贝到userBuffer的数据,外面使用的时候,是如何知道其有效长度的呢?
这里也有问题,应该userBuffer[:size], 我一起修复了 https://github.com/Allenxuxu/gev/pull/123。 非常感谢两位🙏。
https://github.com/Allenxuxu/gev/blob/9262fa12b35a46747cf40ee5cd43efa9187adf85/protocol.go#L21 当e切片长度不为0时,已经将数据拷贝进UserBuffer了,但是并没有将buffer *ringbuffer.RingBuffer清空?这是为什么?