]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/actor/ActorImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC: Start implementing the dependency functions on the AppSide (TBC)
[simgrid.git] / src / kernel / actor / ActorImpl.cpp
index e7e2b7f4963db6cec963ac055e94f2aaf959ad75..06d324c4785cb77ca930750ad2f39b97be81656f 100644 (file)
@@ -230,7 +230,7 @@ void ActorImpl::exit()
     activities_.remove(waiting_synchro_);
     waiting_synchro_ = nullptr;
   }
-  for (auto& activity : activities_)
+  for (auto const& activity : activities_)
     activity->cancel();
   activities_.clear();
 
@@ -379,7 +379,7 @@ void ActorImpl::suspend()
   suspended_ = true;
 
   /* Suspend the activities associated with this actor. */
-  for (auto& activity : activities_)
+  for (auto const& activity : activities_)
     activity->suspend();
 }
 
@@ -397,7 +397,7 @@ void ActorImpl::resume()
   suspended_ = false;
 
   /* resume the activities that were blocked when suspending the actor. */
-  for (auto& activity : activities_)
+  for (auto const& activity : activities_)
     activity->resume();
   if (not waiting_synchro_) // Reschedule the actor if it was forcefully unscheduled in yield()
     simix_global->actors_to_run.push_back(this);