From 3588903e68413e5b42def6dad2c8ece40106c2e5 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 1 Aug 2017 23:13:30 +0200 Subject: [PATCH] Try to fix msg-process-join. On exit, call SIMIX_process_join_finish in maestro context. --- src/simix/ActorImpl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index 318e5ed228..6bd02caaa7 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -723,7 +723,12 @@ smx_activity_t SIMIX_process_join(smx_actor_t issuer, smx_actor_t process, doubl * The C API should first be properly replaced with the C++ one, which is a fair amount of work. */ intrusive_ptr_add_ref(process); - SIMIX_process_on_exit(process, (int_f_pvoid_pvoid_t)SIMIX_process_join_finish, &*res); + SIMIX_process_on_exit(process, + [](void*, void* arg) { + return simgrid::simix::kernelImmediate( + [&] { return SIMIX_process_join_finish(SMX_EXIT_SUCCESS, arg); }); + }, + &*res); return res; } -- 2.20.1