mutracker

package
v1.0.77 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MuTracker

type MuTracker struct {
	// contains filtered or unexported fields
}

MuTracker is a tracker that uses mutexes to lock items

func New

func New() *MuTracker

New creates a new MuTracker

func (*MuTracker) IsItemLocked

func (s *MuTracker) IsItemLocked(rid resource.RID) bool

IsItemLocked returns true if the item with the given RID is locked

func (*MuTracker) LockItem

func (s *MuTracker) LockItem(rid resource.RID)

LockItem locks the item with the given RID

func (*MuTracker) LockedItems

func (s *MuTracker) LockedItems() []resource.RID

LockedItems returns a slice of all the items that are currently locked

func (*MuTracker) UnlockItem

func (s *MuTracker) UnlockItem(rid resource.RID)

UnlockItem unlocks the item with the given RID

Jump to

Keyboard shortcuts

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