MCPcopy
hub / github.com/google/mangle / ConcurrentFactStore

Struct ConcurrentFactStore

factstore/factstore.go:959–962  ·  view source on GitHub ↗

ConcurrentFactStore is an implementation of FactStore that allows multiple concurrent operations on it. The operations are protected by a read-write lock so multiple read operations like Contains or GetFacts can run concurrently, but only one write operation like Add or Merge can run at a time. Also

Source from the content-addressed store, hash-verified

957// write operations.
958// ConcurrentFactStore forwards all its operations to an underlying base FactStore.
959type ConcurrentFactStore struct {
960 mutex *sync.RWMutex
961 base FactStoreWithRemove
962}
963
964// Ensure that ConcurrentFactStore implements the FactStore interface.
965var _ FactStore = NewConcurrentFactStore(NewSimpleInMemoryStore())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected