sliding_slice_locks

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

Buffer provides a first in first out non-blocking (but not lock free) Buffer.

func New

func New() *Buffer

New is the contructor for Buffer.

func (*Buffer) Force

func (q *Buffer) Force(item interface{})

Force will push the item onto the buffer and blocks until the operation completes.

func (*Buffer) Pop

func (q *Buffer) Pop() (val interface{}, ok bool)

Pop returns the next value in the buffer. It returns ok == false if there is no value in the buffer.

func (*Buffer) Pull

func (q *Buffer) Pull() interface{}

Pull pulls an item off the circular buffer. It blocks until a value is found.

func (*Buffer) Push

func (q *Buffer) Push(item interface{})

Push adds an item to the Buffer.

Jump to

Keyboard shortcuts

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