Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / simix / ActorImpl.cpp
index f725f86..2c59aab 100644 (file)
@@ -99,7 +99,6 @@ void SIMIX_process_cleanup(smx_actor_t process)
 
     /* make sure no one will finish the comm after this process is destroyed,
      * because src_proc or dst_proc would be an invalid pointer */
-    comm->cancel();
 
     if (comm->src_proc == process) {
       XBT_DEBUG("Found an unfinished send comm %p (detached = %d), state %d, src = %p, dst = %p",
@@ -125,6 +124,7 @@ void SIMIX_process_cleanup(smx_actor_t process)
     }
     process->comms.pop_front();
     synchro = static_cast<smx_activity_t>(process->comms.front());
+    comm->cancel();
   }
 
   XBT_DEBUG("%p should not be run anymore",process);