MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / executeWithLock

Method executeWithLock

transaction.go:1156–1186  ·  view source on GitHub ↗

executeWithLock executes a function with distributed locks to ensure exclusive access to both source and destination balances. It resolves balance IDs first (handling @world indicators), then acquires locks in deterministic order to prevent deadlocks. Parameters: - ctx context.Context: The context

(ctx context.Context, transaction *model.Transaction, fn func(context.Context) (*model.Transaction, error))

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls 5

resolveBalanceIDsMethod · 0.95
acquireLockMethod · 0.95
releaseLockMethod · 0.95
RecordContentionFunction · 0.92
StartMethod · 0.45

Tested by

no test coverage detected