shmqueue

package
v0.1.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBlockR   = errors.New("BlockR")
	ErrBlockW   = errors.New("BlockW")
	ErrEOF      = errors.New("EOF")
	ErrTruncate = errors.New("truncate")
)

Functions

This section is empty.

Types

type BinarySem

type BinarySem interface {
	Take() bool
	Give(bool)
	Destroy()
}

func NewBinarySem

func NewBinarySem() BinarySem

type BinarySemphore

type BinarySemphore chan struct{}

func (BinarySemphore) Destroy

func (b BinarySemphore) Destroy()

func (BinarySemphore) Give

func (b BinarySemphore) Give(force bool)

func (BinarySemphore) Take

func (b BinarySemphore) Take() bool

type CounterSem

type CounterSem interface {
	Take() bool
	Give(bool)
	Destroy()
}

func NewCounterSem

func NewCounterSem(n int, init int) CounterSem

type CounterSemphore

type CounterSemphore chan struct{}

func (CounterSemphore) Destroy

func (c CounterSemphore) Destroy()

func (CounterSemphore) Give

func (c CounterSemphore) Give(force bool)

func (CounterSemphore) Take

func (c CounterSemphore) Take() bool

type ShmQueue

type ShmQueue interface {
	Push([]byte) error
	Pop([]byte) error
	Destroy()
}

func New

func New(segmentSize int, total int) (ShmQueue, error)

type ShmQueue2

type ShmQueue2 interface {
	Push([]byte) error
	Pop([]byte) error
	Destroy()
}

func NewShmQueue2

func NewShmQueue2(segmentSize int, total int) (ShmQueue2, error)

Jump to

Keyboard shortcuts

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