Jie Yu created MESOS-817:
----------------------------

             Summary: 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


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)

Reply via email to