Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1337#discussion_r137163110
  
    --- Diff: lib/cpp/src/thrift/concurrency/TimerManager.cpp ---
    @@ -52,6 +52,8 @@ class TimerManager::Task : public Runnable {
         }
       }
     
    +  shared_ptr<Runnable> runnable() const { return runnable_; }
    --- End diff --
    
    Consider implementing an ``operator ==`` instead which compares to a 
``shared_ptr<Runnable>`` thus hiding the internal details of the 
``TimerManager::Task`` and simplifying the caller to ``if (task == 
ix->second)`` below.  What's there works, just a suggestion - not required to 
merge.


---

Reply via email to