[ 
https://issues.apache.org/jira/browse/GEODE-2531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15886991#comment-15886991
 ] 

ASF GitHub Bot commented on GEODE-2531:
---------------------------------------

Github user pivotal-jbarrett commented on a diff in the pull request:

    https://github.com/apache/geode-native/pull/37#discussion_r103355323
  
    --- Diff: src/cppcache/include/geode/SharedBase.hpp ---
    @@ -56,11 +57,12 @@ class CPPCACHE_EXPORT SharedBase {
     
      protected:
       inline SharedBase(bool noInit) {}
    +  inline SharedBase(const SharedBase&) {}
     
       virtual ~SharedBase() {}
     
      private:
    -  mutable volatile int32_t m_refCount;
    +  std::atomic<int32_t> m_refCount;
    --- End diff --
    
    It didn't appear that the `mutable` attribute was necessary for operations 
on this value. This `SharedBase` thing is a little funky so I didn't poke too 
deep. The compiler did not find any issues where a `const` function or 
reference was making changes to this value. It may be worth more investigation. 


> 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)

Reply via email to