[ 
https://issues.apache.org/jira/browse/MESOS-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13825891#comment-13825891
 ] 

Jie Yu commented on MESOS-807:
------------------------------

Found another bug that is related to this issue:
{code}
Future<bool> future;
Future<bool> func(int value) { return future; }
{code}
{code:title=Case 1}
void main() {
  Future<int> f1;
  Future<bool> f2 = f1.then(lambda::bind(&func, lambda::_1));
  f2.discard();
}
{code}
{code:title=Case 2}
void main() {
  Future<int> f1 = 10;
  Future<bool> f2 = f1.then(lambda::bind(&func, lambda::_1));
  f2.discard();
}
{code}

One would expect that 

> Discard is not propagated in process::dispatch.
> -----------------------------------------------
>
>                 Key: MESOS-807
>                 URL: https://issues.apache.org/jira/browse/MESOS-807
>             Project: Mesos
>          Issue Type: Bug
>    Affects Versions: 0.15.0
>            Reporter: Jie Yu
>            Assignee: Jie Yu
>
> We would expect these two operations to behave the same:
> Future<T> f = p->foo();
> f.discard(); // Discards the future returned by foo().
> Future<T> f = dispatch(p, P::foo);
> f.discard(); // Currently, this will not discard the future returned by
>                   // foo(), only discards the dispatch promise's future.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to