Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[kernel] FutureState.exception_ = nullptr
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 1 Aug 2016 23:05:53 +0000 (01:05 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 1 Aug 2016 23:06:23 +0000 (01:06 +0200)
This is not mandated to happen with std::move() and does not happen in
at least one implementation.

include/simgrid/kernel/future.hpp

index 9a57f8b..034963d 100644 (file)
@@ -121,6 +121,7 @@ protected:
     status_ = FutureStatus::done;
     if (exception_) {
       std::exception_ptr exception = std::move(exception_);
+      exception_ = nullptr;
       std::rethrow_exception(std::move(exception));
     }
   }