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 (JIRA)" <ji...@apache.org> on 2013/11/18 21:21:30 UTC

[jira] [Assigned] (MESOS-817) CHECK is Future.get() can fail.

     [ https://issues.apache.org/jira/browse/MESOS-817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jie Yu reassigned MESOS-817:
----------------------------

    Assignee: Jie Yu

> CHECK is Future.get() can fail.
> -------------------------------
>
>                 Key: MESOS-817
>                 URL: https://issues.apache.org/jira/browse/MESOS-817
>             Project: Mesos
>          Issue Type: Bug
>         Environment: Linux gcc 4.2.1
>            Reporter: Jie Yu
>            Assignee: Jie Yu
>
> template <typename T>
> T Future<T>::get() const
> {
>   if (!isReady()) {
>     await();
>   }
>   CHECK(!isPending()) << "Future was in PENDING after await()";
>   if (!isReady()) {
>     if (isFailed()) {
>       std::cerr << "Future::get() but state == FAILED: "
>                 << failure()  << std::endl;
>     } else if (isDiscarded()) {
>       std::cerr << "Future::get() but state == DISCARDED" << std::endl;
>     }
>     abort();
>   }
>   assert(data->t != NULL);
>   return *data->t;
> }
> This CHECK can fail:
> CHECK(!isPending()) << "Future was in PENDING after await()";



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