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

Public GIT Repository
Remove useless 2nd parameter "catch_block" for try_n_catch_stoprequest().
[simgrid.git] / src / kernel / context / ContextThread.cpp
index cc2529a60a145ca9594ee445981a3acb61ad9ab0..171e32e62e3039fd9881c58453346b334e50e267 100644 (file)
@@ -100,8 +100,10 @@ void *ThreadContext::wrapper(void *param)
 
   try {
     (*context)();
-    if (not context->is_maestro()) // Just in case somebody detached maestro
+    if (not context->is_maestro()) // Just in case somebody detached maestro
       context->Context::stop();
+      context->stop_hook();
+    }
   } catch (StopRequest const&) {
     XBT_DEBUG("Caught a StopRequest in Thread::wrapper");
     xbt_assert(not context->is_maestro(), "Maestro shall not receive StopRequests, even when detached.");
@@ -146,6 +148,7 @@ void ThreadContext::yield()
 void ThreadContext::stop()
 {
   Context::stop();
+  stop_hook();
   throw StopRequest();
 }