1
1
mirror of https://github.com/walles/moar.git synced 2024-08-16 23:40:35 +03:00

Text readers are done immediately, no need to wait

This commit is contained in:
Johan Walles 2024-01-03 11:01:14 +01:00
parent 8d1553179f
commit fdbbf4d1ca

View File

@ -641,14 +641,6 @@ func benchmarkSearch(b *testing.B, highlighted bool) {
// we're searching through this very file.
pager.searchPattern = regexp.MustCompile("This won'[t] match anything")
// Wait for reader to finish reading...
for !reader.done.Load() {
}
// ... and wait for highlighting to finish
for !reader.highlightingDone.Load() {
}
// I hope forcing a GC here will make numbers more predictable
runtime.GC()