queue

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LockFree

type LockFree struct {
	// contains filtered or unexported fields
}

LockFree is a simple non-blocking and concurrent queue.

func AllocLockFreeQueue

func AllocLockFreeQueue() *LockFree

func (*LockFree) Dequeue

func (q *LockFree) Dequeue() nogc.Bytes

Dequeue removes and returns the value at the head of the queue. It returns nil if the queue is empty.

func (*LockFree) Empty

func (q *LockFree) Empty() bool

Empty indicates whether this queue is empty or not.

func (*LockFree) Enqueue

func (q *LockFree) Enqueue(task nogc.Bytes)

Enqueue puts the given value v at the tail of the queue.

func (*LockFree) Free

func (l *LockFree) Free()

type Task

type Task struct {
	Data nogc.Bytes
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL