Lenshood

Results 3 comments of Lenshood

> Good point, your case is actually similar to the first one @jizhuozhi provided, which is essentially to avoid allocate resources in non-debug level, which makes sense, but here are...

Thank you for your kind reminder! Indeed, we overlooked the issue of passing parameters as `interface{}`. Since there were no generics in Go before go1.18, for utils like Logger, we...

Hi,感谢你的提问。 根据代码,这里的 `isFull()` 的确是不保证只有单个线程通过的,实际的临界区,趋近于在 [`!atomic.CompareAndSwapUint64(&r.tail, oldTail, newTail`](https://github.com/LENSHOOD/go-lock-free-ring-buffer/blob/7da2a921119cb7193f6c341a6b48a3763de22012/classical.go#L38) 这行代码开始后才开始,因此在这行以及之前的代码,都是可以存在多个线程执行的。 不知道我是否正确理解了你的问题,如果理解有偏差,还请多提供多信息,我们再做探讨,谢谢!