> On May 25, 2015, 10:51 p.m., Joris Van Remoortere wrote:
> > 3rdparty/libprocess/src/tests/process_tests.cpp, line 1411
> > <https://reviews.apache.org/r/34644/diff/1/?file=971207#file971207line1411>
> >
> >     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.
> 
> haosdent huang wrote:
>     Agree here, seems a lot of lambda::bind need use capture reference if we 
> want to convert it. And it's danger. I also find some method which don't have 
> params or only have constant param, change some of them could imporve the 
> readability. There are listed in the email which I send you before.

@jvanremoortere I discard this patch. Let me continue to find other exist 
lambdas.


- haosdent


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


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