Documentation
¶
Overview ¶
Package utils is the legacy memory-helper import path.
New code should import the focused replacement packages:
import "github.com/InsideGallery/core/memory/concurrent" import "github.com/InsideGallery/core/memory/order"
Compatibility: SafeList, SafeMap, and Sort remain available for downstream consumers that still import memory/utils. Do not add new helpers here; place them in the focused memory package that owns the behavior.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sort ¶
func Sort(values []interface{}, comparator comparator.Comparator)
Sort sorts values (in-place) with respect to the given comparator.
Uses Go's sort (hybrid of quicksort for large and then insertion sort for smaller slices).
Types ¶
type SafeList ¶
type SafeList[V any] struct { // contains filtered or unexported fields }
func NewSafeList ¶
type SafeMap ¶
func NewSafeMap ¶
Click to show internal directories.
Click to hide internal directories.