()
| 78 | } |
| 79 | |
| 80 | func (e *CachedEntityBase[SnapT, OpT]) CommitAsNeeded() error { |
| 81 | e.mu.Lock() |
| 82 | err := e.entity.CommitAsNeeded(e.repo) |
| 83 | if err != nil { |
| 84 | e.mu.Unlock() |
| 85 | return err |
| 86 | } |
| 87 | e.mu.Unlock() |
| 88 | return e.notifyUpdated() |
| 89 | } |
| 90 | |
| 91 | func (e *CachedEntityBase[SnapT, OpT]) NeedCommit() bool { |
| 92 | e.mu.RLock() |
nothing calls this directly
no test coverage detected