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
| 957 | // write operations. |
| 958 | // ConcurrentFactStore forwards all its operations to an underlying base FactStore. |
| 959 | type ConcurrentFactStore struct { |
| 960 | mutex *sync.RWMutex |
| 961 | base FactStoreWithRemove |
| 962 | } |
| 963 | |
| 964 | // Ensure that ConcurrentFactStore implements the FactStore interface. |
| 965 | var _ FactStore = NewConcurrentFactStore(NewSimpleInMemoryStore()) |
nothing calls this directly
no outgoing calls
no test coverage detected