MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / setUnlessFlushing

Method setUnlessFlushing

pkg/filestore/blockstore.go:496–504  ·  view source on GitHub ↗

returns old value of IsFlushing

()

Source from the content-addressed store, hash-verified

494
495// returns old value of IsFlushing
496func (s *FileStore) setUnlessFlushing() bool {
497 s.Lock.Lock()
498 defer s.Lock.Unlock()
499 if s.IsFlushing {
500 return true
501 }
502 s.IsFlushing = true
503 return false
504}
505
506func (s *FileStore) runFlushWithNewContext() (FlushStats, error) {
507 ctx, cancelFn := context.WithTimeout(context.Background(), DefaultFlushTime)

Callers 1

FlushCacheMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected