X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/13980a49a3d63482f262f96b4491e353eacc1056..c03f25d8392641f56b58640f2c5ddd3fc31b8961:/include/simgrid/simix.hpp diff --git a/include/simgrid/simix.hpp b/include/simgrid/simix.hpp index 1122d16cfb..1f88d9730b 100644 --- a/include/simgrid/simix.hpp +++ b/include/simgrid/simix.hpp @@ -41,16 +41,16 @@ typename std::result_of::type kernel(F&& code) if (SIMIX_is_maestro()) return std::forward(code)(); - // If we are in the application, pass the code to the maestro which is + // If we are in the application, pass the code to the maestro which // executes it for us and reports the result. We use a std::future which // conveniently handles the success/failure value for us. typedef typename std::result_of::type R; - std::promise promise; + simgrid::xbt::Result result; simcall_run_kernel([&]{ xbt_assert(SIMIX_is_maestro(), "Not in maestro"); - simgrid::xbt::fulfillPromise(promise, std::forward(code)); + simgrid::xbt::fulfillPromise(result, std::forward(code)); }); - return promise.get_future().get(); + return result.get(); } class Context;