package slab
import "github.com/diamondburned/gotk4/pkg/core/slab"
Index ¶
Types ¶
type Slab ¶
type Slab struct {
// contains filtered or unexported fields
}
Slab is an implementation of the internal registry free list. A zero-value instance is a valid instance. A slab is safe to use concurrently.
func (*Slab) Delete ¶
Delete removes the entry at the given index.
func (*Slab) Get ¶
Get gets the entry at the given index.
func (*Slab) Grow ¶
Grow grows the slab to the given capacity.
func (*Slab) Pop ¶
Pop removes the entry at the given index and returns the old value.
func (*Slab) Put ¶
Put stores the entry inside the slab. If once is true, then when the entry is retrieved using Get, it will also be wiped off the list.
Source Files ¶
- Version
- v0.3.1 (latest)
- Published
- Jul 31, 2024
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 1 month ago –
Tools for package owners.