Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Future chaining
[simgrid.git] / include / simgrid / simix / blocking_simcall.hpp
index f7f233c..9477465 100644 (file)
@@ -57,7 +57,7 @@ auto kernelSync(F code) -> decltype(code().get())
   simcall_run_blocking([&result, self, &code]{
     try {
       auto future = code();
-      future.then([&result, self](simgrid::kernel::Future<T> value) {
+      future.then_([&result, self](simgrid::kernel::Future<T> value) {
         simgrid::xbt::setPromise(result, value);
         simgrid::simix::unblock(self);
       });
@@ -92,7 +92,7 @@ public:
     simcall_run_blocking([this, &result, self]{
       try {
         // When the kernel future is ready...
-        this->future_.then([this, &result, self](simgrid::kernel::Future<T> value) {
+        this->future_.then_([this, &result, self](simgrid::kernel::Future<T> value) {
           // ... wake up the process with the result of the kernel future.
           simgrid::xbt::setPromise(result, value);
           simgrid::simix::unblock(self);
@@ -122,7 +122,7 @@ public:
     simcall_run_blocking([this, &exception, self]{
       try {
         // When the kernel future is ready...
-        this->future_.then([this, self](simgrid::kernel::Future<T> value) {
+        this->future_.then_([this, self](simgrid::kernel::Future<T> value) {
           // ...store it the simix kernel and wake up.
           this->future_ = std::move(value);
           simgrid::simix::unblock(self);