(lc *y.Closer)
| 1822 | } |
| 1823 | |
| 1824 | func (vlog *valueLog) waitOnGC(lc *y.Closer) { |
| 1825 | defer lc.Done() |
| 1826 | |
| 1827 | <-lc.HasBeenClosed() // Wait for lc to be closed. |
| 1828 | |
| 1829 | // Block any GC in progress to finish, and don't allow any more writes to runGC by filling up |
| 1830 | // the channel of size 1. |
| 1831 | vlog.garbageCh <- struct{}{} |
| 1832 | } |
| 1833 | |
| 1834 | func (vlog *valueLog) runGC(discardRatio float64, head valuePointer) error { |
| 1835 | select { |
no test coverage detected