mirror of
https://github.com/syncthing/syncthing.git
synced 2026-02-19 07:30:34 -05:00
Since iterators must be released before committing or discarding a transaction we have the pattern of both deferring a release plus doing it manually. But we can't release twice because we track this with a WaitGroup that will panic when there are more Done()s than Add()s. This just adds a boolean to let an iterator keep track.