X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/16673e04b393c2d8c031d0d77ec318ac2c711f4e..2d37e348a09783cda723c7019640ee69de168324:/src/kernel/context/ContextThread.cpp diff --git a/src/kernel/context/ContextThread.cpp b/src/kernel/context/ContextThread.cpp index cc2529a60a..171e32e62e 100644 --- a/src/kernel/context/ContextThread.cpp +++ b/src/kernel/context/ContextThread.cpp @@ -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(); }