MCPcopy
hub / github.com/google/seesaw / get

Method get

engine/core.go:718–727  ·  view source on GitHub ↗

get returns the next available mark from the mark allocator.

()

Source from the content-addressed store, hash-verified

716
717// get returns the next available mark from the mark allocator.
718func (ma *markAllocator) get() (uint32, error) {
719 ma.lock.Lock()
720 defer ma.lock.Unlock()
721 if len(ma.marks) == 0 {
722 return 0, errors.New("allocator exhausted")
723 }
724 mark := ma.marks[0]
725 ma.marks = ma.marks[1:]
726 return mark, nil
727}
728
729// put returns the specified mark to the mark allocator.
730func (ma *markAllocator) put(mark uint32) {

Callers 2

markBackendMethod · 0.80
expandFWMServicesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected