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

Public GIT Repository
Don't throw an exception from destructor.
[simgrid.git] / src / kernel / context / ContextThread.cpp
index eb9b4bd0257896dd994623fbbfde2ac9f6482b16..54319b2bb5046c589812080e40ca2cc97c39549c 100644 (file)
@@ -18,9 +18,7 @@
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_context);
 
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
 
 // ThreadContextFactory
 
@@ -166,7 +164,7 @@ void ThreadContext::attach_stop()
 
 void SerialThreadContext::run_all(std::vector<actor::ActorImpl*> const& actors_list)
 {
-  for (smx_actor_t const& actor : actors_list) {
+  for (auto const* actor : actors_list) {
     XBT_DEBUG("Handling %p", actor);
     auto* context = static_cast<ThreadContext*>(actor->context_.get());
     context->release();
@@ -191,10 +189,10 @@ void ParallelThreadContext::finalize()
 
 void ParallelThreadContext::run_all(std::vector<actor::ActorImpl*> const& actors_list)
 {
-  for (smx_actor_t const& actor : actors_list)
+  for (auto const* actor : actors_list)
     static_cast<ThreadContext*>(actor->context_.get())->release();
 
-  for (smx_actor_t const& actor : actors_list)
+  for (auto const* actor : actors_list)
     static_cast<ThreadContext*>(actor->context_.get())->wait();
 }
 
@@ -215,6 +213,4 @@ XBT_PRIVATE ContextFactory* thread_factory()
   XBT_VERB("Activating thread context factory");
   return new ThreadContextFactory();
 }
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context