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:
parent
8d1553179f
commit
fdbbf4d1ca
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user