Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix concurrency write map panic:
fatal error: concurrent map read and map write
goroutine 163 [running]:
runtime.throw({0x109be48, 0xf5ae00})
/usr/local/go/src/runtime/panic.go:1198 +0x71 fp=0xc0041e0630 sp=0xc0041e0600 pc=0x435bf1
runtime.mapaccess2_faststr(0xc003c2e5e8, 0x26, {0x107e883, 0x7})
/usr/local/go/src/runtime/map_faststr.go:116 +0x3d4 fp=0xc0041e0698 sp=0xc0041e0630 pc=0x412db4
github.com/zhenghaoz/gorse/worker.(*Worker).exploreRecommend(0xc00025e000, {0xc00bad2c00, 0x28, 0x28}, 0x1089476, {0xc000f2ba00, 0xf})
/Users/mac/code/gorse/worker/worker.go:713 +0x90 fp=0xc0041e07a0 sp=0xc0041e0698 pc=0xe68350
github.com/zhenghaoz/gorse/worker.(*Worker).Recommend.func2(0x0, 0x7ffb)
/Users/mac/code/gorse/worker/worker.go:602 +0x2e35 fp=0xc0041e1f48 sp=0xc0041e07a0 pc=0xe65c95
github.com/zhenghaoz/gorse/base.Parallel.func2(0x0)
/Users/mac/code/gorse/base/parallel.go:67 +0xc4 fp=0xc0041e1fc8 sp=0xc0041e1f48 pc=0x78e824
github.com/zhenghaoz/gorse/base.Parallel·dwrap·1()
/Users/mac/code/gorse/base/parallel.go:72 +0x2d fp=0xc0041e1fe0 sp=0xc0041e1fc8 pc=0x78e72d
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0041e1fe8 sp=0xc0041e1fe0 pc=0x468401
created by github.com/zhenghaoz/gorse/base.Parallel
/Users/mac/code/gorse/base/parallel.go:57 +0x130