concurrent_map

package
v4.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: GPL-3.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 Map added in v4.3.0

type Map[K MapHashable, V any] struct {
	// contains filtered or unexported fields
}

func NewMap added in v4.3.0

func NewMap[K MapHashable, V any]() *Map[K, V]

func (*Map[K, V]) Del added in v4.3.0

func (m *Map[K, V]) Del(key K)

func (*Map[K, V]) Get added in v4.3.0

func (m *Map[K, V]) Get(key K) (V, bool)

func (*Map[K, V]) Len added in v4.3.0

func (m *Map[K, V]) Len() int

func (*Map[K, V]) RangeDo added in v4.3.0

func (m *Map[K, V]) RangeDo(f TestAndSetFunc[K, V])

func (*Map[K, V]) Set added in v4.3.0

func (m *Map[K, V]) Set(key K, v V)

func (*Map[K, V]) TestAndSet added in v4.3.0

func (m *Map[K, V]) TestAndSet(key K, f TestAndSetFunc[K, V])

type MapHashable added in v4.3.0

type MapHashable interface {
	comparable
	MapHash() int
}

type TestAndSetFunc

type TestAndSetFunc[K comparable, V any] func(key K, v V, ok bool) (newV V, setV, deleteV bool)

Jump to

Keyboard shortcuts

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