From fdbbf4d1ca3676369708275c175c9c2127626214 Mon Sep 17 00:00:00 2001 From: Johan Walles Date: Wed, 3 Jan 2024 11:01:14 +0100 Subject: [PATCH] Text readers are done immediately, no need to wait --- m/pager_test.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/m/pager_test.go b/m/pager_test.go index c535194..4df8262 100644 --- a/m/pager_test.go +++ b/m/pager_test.go @@ -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()