sync

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWeightedSemaphore

func NewWeightedSemaphore(size int64) *semaphore.Weighted

Types

type Map added in v0.8.8

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

func NewMap added in v0.8.8

func NewMap[T comparable, K any]() *Map[T, K]

func NewMapFromMap added in v0.8.8

func NewMapFromMap[T comparable, K any](m map[T]K) *Map[T, K]

func NewMapWithLen added in v0.8.8

func NewMapWithLen[T comparable, K any](len int) *Map[T, K]

func (*Map[T, K]) Delete added in v0.8.8

func (m *Map[T, K]) Delete(key T)

func (*Map[T, K]) Get added in v0.8.8

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

func (*Map[T, K]) GetMap added in v0.8.8

func (m *Map[T, K]) GetMap() map[T]K

func (*Map[T, K]) Set added in v0.8.8

func (m *Map[T, K]) Set(key T, value K)

type WeightedSemaphore

type WeightedSemaphore interface {
	TryAcquire(int64) bool
	Acquire(context.Context, int64) error
	Release(int64)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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