/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
* returns a `simgrid::kernel::Future<T>`. The kernel blocks the actor
* until the Future is ready and:
*
* returns a `simgrid::kernel::Future<T>`. The kernel blocks the actor
* until the Future is ready and:
*
simgrid::xbt::Result<T> result;
simcall_run_blocking([&result, self, &code]{
try {
auto future = code();
simgrid::xbt::Result<T> result;
simcall_run_blocking([&result, self, &code]{
try {
auto future = code();
- future.then_([&result, self](simgrid::kernel::Future<T> value) {
- simgrid::xbt::setPromise(result, value);
+ future.then_([&result, self](std::shared_ptr<simgrid::kernel::FutureState<T>>&& value) {
+ simgrid::xbt::set_promise(result, simgrid::kernel::Future<T>(value));
simgrid::xbt::Result<T> result;
simcall_run_blocking([this, &result, self]{
try {
// When the kernel future is ready...
simgrid::xbt::Result<T> result;
simcall_run_blocking([this, &result, self]{
try {
// When the kernel future is ready...
simcall_run_blocking([this, &exception, self]{
try {
// When the kernel future is ready...
simcall_run_blocking([this, &exception, self]{
try {
// When the kernel future is ready...