Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
factorize where seq_runall and par_runall save maestro context
[simgrid.git] / src / kernel / context / ContextUnix.cpp
index 35316d9..8bb3202 100644 (file)
@@ -55,8 +55,7 @@ UContext::UContext(std::function<void()> code, void_pfn_smxprocess_t cleanup_fun
 #endif
     UContext::make_ctx(&this->uc_, UContext::smx_ctx_sysv_wrapper, this);
   } else {
-    if (process != nullptr && get_maestro() == nullptr)
-      set_maestro(this);
+    set_maestro(this); // save maestro for run_all()
   }
 
 #if SIMGRID_HAVE_MC
@@ -66,8 +65,6 @@ UContext::UContext(std::function<void()> code, void_pfn_smxprocess_t cleanup_fun
 #endif
 }
 
-UContext::~UContext() = default;
-
 // The name of this function is currently hardcoded in the code (as string).
 // Do not change it without fixing those references as well.
 void UContext::smx_ctx_sysv_wrapper(int i1, int i2)