-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23867/#review48691
-----------------------------------------------------------

Ship it!



src/master/detector.cpp
<https://reviews.apache.org/r/23867/#comment85453>

    I don't if this is going overboard but perhaps it belongs with other 
methods (as a template) in the promises:: namespace in this file: "void 
discard(std::set<Promise<T>* >* promises, const WeakFuture<T>& future)"
    
    There is a similar one in future.hpp too.
    
    template <typename T>
    void discard(WeakFuture<T> reference)
    {
      Option<Future<T> > future = reference.get();
      if (future.isSome()) {
        Future<T> future_ = future.get();
        future_.discard();
      }
    }
    
    I like that promises:: and futures:: namespaces are clearly separated to 
avoid confusion.


- Jiang Yan Xu


On July 23, 2014, 7:55 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23867/
> -----------------------------------------------------------
> 
> (Updated July 23, 2014, 7:55 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-1529
>     https://issues.apache.org/jira/browse/MESOS-1529
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> In order to trigger re-detections in the slave, we need to be able to discard 
> the Future returned from detect(). This adds discard support to detect().
> 
> 
> Diffs
> -----
> 
>   src/master/detector.cpp a34cc211941972e2d64802d5c7ed3f5026229744 
>   src/tests/master_contender_detector_tests.cpp 
> 231648d3c564f9a38937b844459c08f0fdd66a92 
> 
> Diff: https://reviews.apache.org/r/23867/diff/
> 
> 
> Testing
> -------
> 
> Updated the existing tests.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>

Reply via email to