+ // Synchronize on a successul Future<int> and get the value:
+ future = simgrid::simix::kernelAsync([&] {
+ return kernel_wait_until(60).then([](simgrid::kernel::Future<void> future) {
+ future.get();
+ XBT_INFO("kernelAsync with value");
+ return 43;
+ });
+ });
+ XBT_INFO("The future is %s", future.is_ready() ? "ready" : "not ready");
+ future.wait();
+ XBT_INFO("The future is %s", future.is_ready() ? "ready" : "not ready");
+ res = future.get();
+ XBT_INFO("kernelAsync with value returned with %i", res);
+