xcollections

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package xcollections provides thread-safe collection types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MUMap

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

MUMap is a thread-safe map implementation using RWMutex for concurrent access.

func NewMUMap

func NewMUMap[K comparable, V any]() *MUMap[K, V]

NewMUMap creates and initializes a new thread-safe map.

func (*MUMap[K, V]) Add

func (m *MUMap[K, V]) Add(key K, value V)

Add inserts or updates a key-value pair in the map.

func (*MUMap[K, V]) Get

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

Get retrieves a value by key. Returns the value and a boolean indicating whether the key exists.

Jump to

Keyboard shortcuts

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