X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/504e8ecc4d4245655dafaae23e56e64260b746ad..66f84edf2502421941eaaa74414323a16979b9ad:/include/simgrid/kernel/future.hpp diff --git a/include/simgrid/kernel/future.hpp b/include/simgrid/kernel/future.hpp index ec2c7a4ad8..332cf19157 100644 --- a/include/simgrid/kernel/future.hpp +++ b/include/simgrid/kernel/future.hpp @@ -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> state) : state_(std::move(state)) {} - ~Future() = default; // Move type: Future(Future&) = delete; @@ -415,7 +413,7 @@ template Future unwrap_future(Future> future) * auto promise = std::make_shared>(); * 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)