lunar-go icon indicating copy to clipboard operation
lunar-go copied to clipboard

[BUG] calendar.NewLunarYear 并发写LEAP以及CACHE

Open Durden-T opened this issue 2 years ago • 1 comments

fatal error: concurrent map writes

goroutine 83169046 [running]: runtime.throw(0x23499751, 0x15) /usr/local/go/src/runtime/panic.go:1117 +0x72 fp=0xc049027458 sp=0xc049027428 pc=0x9b894b2 runtime.mapassign_fast64(0x21ae1ac0, 0xc00eab86c0, 0x7f2, 0x337c7f00) /usr/local/go/src/runtime/map_fast64.go:101 +0x33e fp=0xc049027498 sp=0xc049027458 pc=0x9b63bde github.com/6tail/lunar-go/calendar.NewLunarYear(0x7f2, 0xeeff37e80) /opt/compile_path/pkg/mod/github.com/6tail/[email protected]/calendar/LunarYear.go:58 +0x27e fp=0xc0490274f0 sp=0xc049027498 pc=0x20a5417e github.com/6tail/lunar-go/calendar.NewLunarFromDate(0x0, 0xeeff37e80, 0x33765e40, 0x0) /opt/compile_path/pkg/mod/github.com/6tail/[email protected]/calendar/Lunar.go:93 +0xa5 fp=0xc0490275a0 sp=0xc0490274f0 pc=0x20a3e225 github.com/6tail/lunar-go/calendar.(*Solar).GetLunar(...) /opt/compile_path/pkg/mod/github.com/6tail/[email protected]/calendar/Solar.go:355

image

Durden-T avatar Feb 13 '23 04:02 Durden-T

v1.3.0理论上已修复。

6tail avatar Feb 20 '23 13:02 6tail