Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
NetworkModelIntf: Interface to dynamic factors
[simgrid.git] / include / simgrid / kernel / future.hpp
index ec2c7a4ad8f08d7d5a8839e3bab1886aa6fa0bf8..332cf19157818741b40231c8d8263e4718bc00ec 100644 (file)
@@ -116,8 +116,7 @@ protected:
    **/
   void resolve()
   {
-    if (status_ != FutureStatus::ready)
-      xbt_die("Deadlock: this future is not ready");
+    xbt_assert(status_ == FutureStatus::ready, "Deadlock: this future is not ready");
     status_ = FutureStatus::done;
     if (exception_) {
       std::exception_ptr exception = std::move(exception_);
@@ -279,7 +278,6 @@ class Future {
 public:
   Future() = default;
   explicit Future(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
-  ~Future() = default;
 
   // Move type:
   Future(Future&) = delete;
@@ -415,7 +413,7 @@ template <class T> Future<T> unwrap_future(Future<Future<T>> future)
  *  auto promise = std::make_shared<simgrid::kernel::Promise<T>>();
  *  auto future = promise->get_future();
  *
- *  simgrid::simix::Timer::set(date, [promise] {
+ *  simgrid::kernel::timer::Timer::set(date, [promise] {
  *    try {
  *      int value = compute_the_value();
  *      if (value < 0)