[ https://issues.apache.org/jira/browse/GEODE-2531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15886131#comment-15886131 ]
ASF GitHub Bot commented on GEODE-2531: --------------------------------------- Github user PivotalSarge commented on a diff in the pull request: https://github.com/apache/geode-native/pull/37#discussion_r103254380 --- Diff: src/cppcache/include/geode/CacheStatistics.hpp --- @@ -102,8 +102,8 @@ class CPPCACHE_EXPORT CacheStatistics : public SharedBase { virtual void setLastAccessedTime(uint32_t lat); virtual void setLastModifiedTime(uint32_t lmt); - volatile uint32_t m_lastAccessTime; - volatile uint32_t m_lastModifiedTime; + std::atomic<uint32_t> m_lastAccessTime; + std::atomic<uint32_t> m_lastModifiedTime; --- End diff -- std::atomic is pretty cool. It looks like the performance impact is negligible, right? > Replace HostAsm::atomic* and AtomicInc with std::atomic > ------------------------------------------------------- > > Key: GEODE-2531 > URL: https://issues.apache.org/jira/browse/GEODE-2531 > Project: Geode > Issue Type: Sub-task > Components: native client > Reporter: Jacob S. Barrett > Assignee: Jacob S. Barrett > > Replace {{HostAsm::atomic*}} and {{AtomicInc}} with > {{[std::atomic|http://en.cppreference.com/w/cpp/atomic/atomic]}}. -- This message was sent by Atlassian JIRA (v6.3.15#6346)