ring

package
v0.0.0-...-972597a Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Unlicense Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Size     = 128 << 10 // ~128000
	Mask     = Size - 1
	CellSize = 4 << 10 // 4kb
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell

type Cell struct {
	Size int64
	Data [CellSize]byte
	// contains filtered or unexported fields
}

func (*Cell) Enqueue

func (cell *Cell) Enqueue()

func (*Cell) Release

func (cell *Cell) Release()

type Ring

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

func New

func New() *Ring

func (*Ring) Allocate

func (ring *Ring) Allocate() *Cell

func (*Ring) Dequeue

func (ring *Ring) Dequeue() (cell *Cell)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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