mpmc

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor [8]uint64 // prevent false sharing of the sequence cursor by padding the CPU cache line with 64 *bytes* of data.

func NewCursor

func NewCursor() *Cursor

func (*Cursor) CmpAndSwap

func (c *Cursor) CmpAndSwap(old, new uint64) bool

func (*Cursor) Load

func (c *Cursor) Load() uint64

func (*Cursor) Store

func (c *Cursor) Store(value uint64)

type Queue

type Queue[T any] struct {
	Nil T
	// contains filtered or unexported fields
}

func New

func New[T any](size uint64) *Queue[T]

func (*Queue[T]) Init

func (q *Queue[T]) Init(size uint64)

func (*Queue[T]) Pop

func (q *Queue[T]) Pop() T

func (*Queue[T]) Push

func (q *Queue[T]) Push(data T)

Jump to

Keyboard shortcuts

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