summaryrefslogtreecommitdiffstats
path: root/src/merger.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-01-11 23:49:12 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-01-11 23:49:12 +0900
commit9dbf6b02d24b52ae43e36905bbb1e83087e1dfe9 (patch)
tree37e627f5bb4a3037ea769aad1033593baec4eb00 /src/merger.go
parent1db68a3976cfb10ed7d6ab88d7b468bb1b93ee34 (diff)
Fix race conditions
- Wait for completions of goroutines when cancelling a search - Remove shared access to rank field of Item
Diffstat (limited to 'src/merger.go')
-rw-r--r--src/merger.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/merger.go b/src/merger.go
index 08a3d154..16afdafc 100644
--- a/src/merger.go
+++ b/src/merger.go
@@ -57,7 +57,7 @@ func (mg *Merger) mergedGet(idx int) *Item {
continue
}
if cursor >= 0 {
- rank := list[cursor].Rank()
+ rank := list[cursor].Rank(false)
if minIdx < 0 || compareRanks(rank, minRank) {
minRank = rank
minIdx = listIdx