X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0c2ac968733dbe915aef6ec0f3b5ec01bbc955cd..1d73bc8d8ca9c10a5987cb9e2df7d77ae67d556a:/include/simgrid/simix/blocking_simcall.hpp diff --git a/include/simgrid/simix/blocking_simcall.hpp b/include/simgrid/simix/blocking_simcall.hpp index e43affe5e2..973ead8284 100644 --- a/include/simgrid/simix/blocking_simcall.hpp +++ b/include/simgrid/simix/blocking_simcall.hpp @@ -57,7 +57,7 @@ template auto kernel_sync(F code) -> decltype(code().get()) try { auto future = code(); future.then_([&result, self](std::shared_ptr>&& value) { - simgrid::xbt::set_promise(result, simgrid::kernel::Future(value)); + simgrid::xbt::set_promise(result, simgrid::kernel::Future(std::move(value))); simgrid::simix::unblock(self); }); } catch (...) { @@ -94,7 +94,7 @@ public: // When the kernel future is ready... this->future_.then_([&result, self](std::shared_ptr>&& value) { // ... wake up the process with the result of the kernel future. - simgrid::xbt::set_promise(result, simgrid::kernel::Future(value)); + simgrid::xbt::set_promise(result, simgrid::kernel::Future(std::move(value))); simgrid::simix::unblock(self); }); } catch (...) { @@ -125,7 +125,7 @@ public: // When the kernel future is ready... this->future_.then_([this, self](std::shared_ptr>&& value) { // ...store it the simix kernel and wake up. - this->future_ = std::move(simgrid::kernel::Future(value)); + this->future_ = simgrid::kernel::Future(std::move(value)); simgrid::simix::unblock(self); }); } catch (...) {