channel

package
v2.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vec

type Vec struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewVector

func NewVector(len uint64) *Vec

func (*Vec) Destroy

func (v *Vec) Destroy()

func (*Vec) Pop

func (v *Vec) Pop(ctx context.Context) (worker.BaseProcess, error)

func (*Vec) Push

func (v *Vec) Push(w worker.BaseProcess)

Push is O(1) operation In case of TTL and full channel O(n) worst case, where n is len of the channel

func (*Vec) Remove

func (v *Vec) Remove(_ int64)

Jump to

Keyboard shortcuts

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