package
Version:
v0.8.5
Opens a new window with list of versions in this module.
Published: Aug 7, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
LKQueue is a lock-free unbounded queue.
See https://colobu.com/2020/08/14/lock-free-queue-in-go/
NewLKQueue returns an empty queue.
func (q *LKQueue) Dequeue() interface{}
Dequeue removes and returns the value at the head of the queue.
It returns nil if the queue is empty.
func (q *LKQueue) Enqueue(v interface{})
Enqueue puts the given value v at the tail of the queue.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.