Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LLStack ¶
type LLStack[Value any] struct { // contains filtered or unexported fields }
LLStack is a lock-free stack implemented with linked list, based on atomic compare-and-swap operations.
func (*LLStack[Value]) Push ¶
Push adds a new value to the stack. It keeps retrying in case of conflict with concurrent Pop()/Push() operations.
type QueueAdapter ¶
type QueueAdapter[T any] struct { // contains filtered or unexported fields }
func (*QueueAdapter[T]) Dequeue ¶
func (q *QueueAdapter[T]) Dequeue() (T, bool)
func (*QueueAdapter[T]) Empty ¶
func (q *QueueAdapter[T]) Empty() bool
func (*QueueAdapter[T]) Enqueue ¶
func (q *QueueAdapter[T]) Enqueue(v T) bool
func (*QueueAdapter[T]) Full ¶
func (q *QueueAdapter[T]) Full() bool
func (*QueueAdapter[T]) Size ¶
func (q *QueueAdapter[T]) Size() int
Click to show internal directories.
Click to hide internal directories.