X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/467a0c53018ee489de1dd7ae61a083d52048b8e8..6e16b58747eec5f035a6ffd4f5344d277dd1e753:/teshsuite/simix/generic_simcalls/generic_simcalls.cpp diff --git a/teshsuite/simix/generic_simcalls/generic_simcalls.cpp b/teshsuite/simix/generic_simcalls/generic_simcalls.cpp index f1743b585f..316065724d 100644 --- a/teshsuite/simix/generic_simcalls/generic_simcalls.cpp +++ b/teshsuite/simix/generic_simcalls/generic_simcalls.cpp @@ -75,6 +75,16 @@ static int master(int argc, char *argv[]) }); XBT_INFO("blocking_simcall with value returned with %i", res); + // Synchronize on a successul Future and get the value: + simgrid::simix::Future future = simgrid::simix::asynchronous_simcall([&] { + return kernel_defer(50, [] { + XBT_INFO("asynchronous_simcall with value"); + return 43; + }); + }); + res = future.get(); + XBT_INFO("asynchronous_simcall with value returned with %i", res); + return 0; }