queue

package module
v0.0.0-...-41d78f0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

queue

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delay

func Delay(z int)

Types

type Cache

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

type Queue

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

Queue Lockless free queue

func NewQueue

func NewQueue[T any](capacity uint32) *Queue[T]

func (*Queue[T]) Capacity

func (q *Queue[T]) Capacity() uint32

func (*Queue[T]) Get

func (q *Queue[T]) Get() (val *T, ok bool, quantity uint32)

Get queue functions

func (*Queue[T]) Gets

func (q *Queue[T]) Gets(values []*T) (gets, quantity uint32)

Gets queue functions

func (*Queue[T]) Put

func (q *Queue[T]) Put(val *T) (ok bool, quantity uint32)

Put queue functions

func (*Queue[T]) Puts

func (q *Queue[T]) Puts(values []*T) (puts, quantity uint32)

Puts queue functions

func (*Queue[T]) Quantity

func (q *Queue[T]) Quantity() uint32

func (*Queue[T]) String

func (q *Queue[T]) String() string

Directories

Path Synopsis
examples
pprof1
queue_test
queue_test
pprof2
queue_test
queue_test
pprof4
queue_test
queue_test
pprof5
queue_test
queue_test

Jump to

Keyboard shortcuts

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