mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
415adfbae6
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.