Closed DeltaLaboratory closed 1 year ago
When i calling bar.DecoratorEwmaUpdate after calling bar.Increment() inside goroutine, it panics.
I am using go1.19.1, windows/amd64.
There is some example code that seems cause panic...
https://go.dev/play/p/2oSrMdlHcEF
I've updated api to fix this. You need to call bar.EwmaIncrement(time.Since(goRoutineStartTime)) instead. https://go.dev/play/p/pYIHUmWzo5O
bar.EwmaIncrement(time.Since(goRoutineStartTime))
The patch fixed the problem. Thank you!
When i calling bar.DecoratorEwmaUpdate after calling bar.Increment() inside goroutine, it panics.
I am using go1.19.1, windows/amd64.
There is some example code that seems cause panic...
https://go.dev/play/p/2oSrMdlHcEF