func (r *nodeBased) Poll() (value interface{}, success bool) {
	oldHead := atomic.LoadUint64(&r.head)
	headNode := r.element[oldHead&r.mask]
	oldStep := atomic.LoadUint64(&headNode.step)
	if oldStep != oldHead+1 {
		return nil, false
	}
	if !atomic.CompareAndSwapUint64(&r.head, oldHead, oldHead+1) {
		return nil, false
	}
	value = *(*interface{})(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&headNode.value))))
	atomic.StoreUint64(&headNode.step, oldStep+r.mask)
	return value, true
}
Poll head value pointer.
package lfring
import (
	atomic "sync/atomic"
	"unsafe"
)
type nodeBased struct {
	head      uint64
	_padding0 [56]byte
	tail      uint64
	_padding1 [56]byte
	mask      uint64
	_padding2 [56]byte
	element   []*node
}
type node struct {
	step     uint64
	value    interface{}
	_padding [40]byte
}
func newNodeBased(capacity uint64) RingBuffer {
	nodes := make([]*node, capacity)
	for i := uint64(0); i < capacity; i++ {
		nodes[i] = &node{step: i}
	}
	return &nodeBased{
		head:    uint64(0),
		tail:    uint64(0),
		mask:    capacity - 1,
		element: nodes,
	}
}
func (r *nodeBased) Offer(value interface{}) (success bool) {
	oldTail := atomic.LoadUint64(&r.tail)
	tailNode := r.element[oldTail&r.mask]
	oldStep := atomic.LoadUint64(&tailNode.step)
	if oldStep != oldTail {
		return false
	}
	if !atomic.CompareAndSwapUint64(&r.tail, oldTail, oldTail+1) {
		return false
	}
	atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&tailNode.value)), unsafe.Pointer(&value))
	atomic.StoreUint64(&tailNode.step, tailNode.step+1)
	return true
}