You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We get a RACE error on running tests in the production with the flag -race enabled.
And the stack shows it comes from here:
I believe that the reason is multiple goroutines are calling method ExpTaylor and this method manipulates the shared variable factorials (https://github.com/shopspring/decimal/blob/master/decimal.go#L84).
As you used a global variable for caching factorials (#229), it's not goroutine safe and should have a lock.
The text was updated successfully, but these errors were encountered:
We get a RACE error on running tests in the production with the flag
-race
enabled.And the stack shows it comes from here:
I believe that the reason is multiple goroutines are calling method
ExpTaylor
and this method manipulates the shared variablefactorials
(https://github.com/shopspring/decimal/blob/master/decimal.go#L84).As you used a global variable for caching factorials (#229), it's not goroutine safe and should have a lock.
The text was updated successfully, but these errors were encountered: