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



3rdparty/libprocess/src/tests/process_tests.cpp
<https://reviews.apache.org/r/34644/#comment136611>

    I don't think this will compile.
    This forces a copy of `receiver`, which the `EventReceiver` class does not 
support.
    Even if it did support it, we would need to mark the lambda as `mutable` 
since we intend to call a non `const` function on a copied value.
    One way to resolve this is to capture `receiver` by reference. This would 
work since we wait till the functions are completed before we destroy the 
`receiver` object. Since this is somewhat dangerous and non-default behavior, 
we should comment what is going on if we go this way.
    
    This issue arises due to the underlying transformation. The original code 
binds the function call the to instance of the `receiver` object. It also had 
the same un-documented dangerous behavior.
    
    The same goes for `event2` below.


- Joris Van Remoortere


On May 24, 2015, 4:53 p.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34644/
> -----------------------------------------------------------
> 
> (Updated May 24, 2015, 4:53 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2670
>     https://issues.apache.org/jira/browse/MESOS-2670
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Update existing lambdas to meet style guide
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/tests/process_tests.cpp 
> 67e582cc250a9767a389e2bd0cc68985477f3ffb 
> 
> Diff: https://reviews.apache.org/r/34644/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> haosdent huang
> 
>

Reply via email to