X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6d7c8b38a6c1ed33b29a5ef2fc3cd120c26e0819..08acb8036ee3b3d4cb1da247a5841ad18f677b52:/include/simgrid/simix/blocking_simcall.hpp diff --git a/include/simgrid/simix/blocking_simcall.hpp b/include/simgrid/simix/blocking_simcall.hpp index a856eca0ee..8cd2eee73f 100644 --- a/include/simgrid/simix/blocking_simcall.hpp +++ b/include/simgrid/simix/blocking_simcall.hpp @@ -59,8 +59,8 @@ auto kernelSync(F code) -> decltype(code().get()) simcall_run_blocking([&result, self, &code]{ try { auto future = code(); - future.then_([&result, self](simgrid::kernel::Future value) { - simgrid::xbt::setPromise(result, value); + future.then_([&result, self](std::shared_ptr>&& value) { + simgrid::xbt::setPromise(result, simgrid::kernel::Future(value)); simgrid::simix::unblock(self); }); } @@ -94,9 +94,9 @@ public: simcall_run_blocking([this, &result, self]{ try { // When the kernel future is ready... - this->future_.then_([&result, self](simgrid::kernel::Future value) { + this->future_.then_([&result, self](std::shared_ptr>&& value) { // ... wake up the process with the result of the kernel future. - simgrid::xbt::setPromise(result, value); + simgrid::xbt::setPromise(result, simgrid::kernel::Future(value)); simgrid::simix::unblock(self); }); } @@ -124,9 +124,9 @@ public: simcall_run_blocking([this, &exception, self]{ try { // When the kernel future is ready... - this->future_.then_([this, self](simgrid::kernel::Future value) { + this->future_.then_([this, self](std::shared_ptr>&& value) { // ...store it the simix kernel and wake up. - this->future_ = std::move(value); + this->future_ = std::move(simgrid::kernel::Future(value)); simgrid::simix::unblock(self); }); }