mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "haosdent (JIRA)" <>
Subject [jira] [Commented] (MESOS-5038) Added a any mechanism for futures
Date Fri, 08 Apr 2016 01:43:25 GMT


haosdent commented on MESOS-5038:

Compare with use {{Future<T> any(const std::list<Future<T>>& futures)}},
the problem of add mode to {{collect}} is it always return {{list}} although we may just want
to get single result when use {{ANY}} mode.

> Added a any mechanism for futures
> ---------------------------------
>                 Key: MESOS-5038
>                 URL:
>             Project: Mesos
>          Issue Type: Improvement
>          Components: libprocess
>            Reporter: haosdent
>            Assignee: haosdent
> Now we already have {{collect}} and {{await}} mechanisms which would wait for a list
of {{Future}}. However, we would like to return immediately if any of the list of {{Future}}
complete instead of wait for the whole list finished in {{collect}}. The interface of this
any mechanism could be
> {code}
> template <typename T>
> Future<T> any(const std::list<Future<T>>& futures);
> {code}

This message was sent by Atlassian JIRA

View raw message