Run NodesReferenceutils

lock

Package lock

import "github.com/luxfi/node/utils/lock"

Types

Cond

Cond implements a condition variable. Typically [sync.Cond] should be preferred. However, this implementation supports cancellable waits.

func NewCond(l sync.Locker) *Cond
func (c *Cond) Broadcast()
func (c *Cond) Signal()
func (c *Cond) Wait(ctx context.Context) error

State

State represents a lockable state

func (s *State) Acquire()
func (s *State) Lock() sync.Locker
func (s *State) RAcquire()
func (s *State) RLock() sync.Locker
func (s *State) RRelease()
func (s *State) Release()