Github user PivotalSarge commented on a diff in the pull request: https://github.com/apache/geode-native/pull/37#discussion_r103257502 --- Diff: src/cppcache/src/statistics/AtomicStatisticsImpl.cpp --- @@ -330,7 +329,13 @@ double AtomicStatisticsImpl::_incDouble(int32_t offset, double delta) { throw IllegalArgumentException(s); } - return (doubleStorage[offset] += delta); + double expected = doubleStorage[offset]; + double value; + do { + value = expected + delta; + } while (!doubleStorage[offset].compare_exchange_weak(expected, value)); --- End diff -- If compare_exchange_weak() fails, should expected be refreshed with doubleStorage[offset]?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---