Closed coduinix closed 6 years ago
Hey @coduinix – thanks for the contribution, and sorry that this slipped through. It's been tricky to test this reliably, so thanks for your patience. Looks good! :+1:
Indeed tricky to test. I tried to create a more reliable test, but did not succeed yet.
@coduinix I just released v0.0.9 with this change – thanks again. It's now available on bintray, and is in the process of syncing to Maven Central.
@samstarling That was quick... Thanks!
Synchronization should be done around the getOrElseUpdate. Otherwise we can still have the side effecting operation (in newSummary), twice for the same metric.