You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2013/11/25 19:51:51 UTC
Re: Review Request 15319: Changed Promise::associate such that 'discard' is
associated in both directions
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15319/
-----------------------------------------------------------
(Updated Nov. 25, 2013, 6:51 p.m.)
Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
Changes
-------
Updated the title.
Summary (updated)
-----------------
Changed Promise::associate such that 'discard' is associated in both directions
Repository: mesos-git
Description
-------
Say you have a process defined as follows:
class FooProcess : public Process<FooProcess>
{
public:
Future<bool> func() { return future; }
private:
Future<bool> future;
};
Then you call dispatch that returns a future:
Future<bool> f = dispatch(process, &FooProcess::func);
If the user discards the future 'f', we expect the 'future' field in FooProcess also being discarded. However, this is not the case currently.
This patch fixed this issue.
Diffs
-----
3rdparty/libprocess/include/process/future.hpp 1625d1d
3rdparty/libprocess/src/tests/process_tests.cpp 7848599
Diff: https://reviews.apache.org/r/15319/diff/
Testing
-------
make check
Also:
3rdparty/libprocess/tests --gtest_repeat=1000
Thanks,
Jie Yu
Re: Review Request 15319: Changed Promise::associate such that 'discard' is
associated in both directions
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15319/#review29379
-----------------------------------------------------------
Ship it!
Ship It!
- Ben Mahler
On Nov. 25, 2013, 6:51 p.m., Jie Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15319/
> -----------------------------------------------------------
>
> (Updated Nov. 25, 2013, 6:51 p.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> Say you have a process defined as follows:
>
> class FooProcess : public Process<FooProcess>
> {
> public:
> Future<bool> func() { return future; }
> private:
> Future<bool> future;
> };
>
> Then you call dispatch that returns a future:
>
> Future<bool> f = dispatch(process, &FooProcess::func);
>
> If the user discards the future 'f', we expect the 'future' field in FooProcess also being discarded. However, this is not the case currently.
>
> This patch fixed this issue.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/future.hpp 1625d1d
> 3rdparty/libprocess/src/tests/process_tests.cpp 7848599
>
> Diff: https://reviews.apache.org/r/15319/diff/
>
>
> Testing
> -------
>
> make check
>
> Also:
> 3rdparty/libprocess/tests --gtest_repeat=1000
>
>
> Thanks,
>
> Jie Yu
>
>