X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ea74f5d95928a521a588737e81f1de94eef25d19..3580b0137eab12ca216d9847823c86918b10dd53:/src/kernel/context/ContextThread.cpp diff --git a/src/kernel/context/ContextThread.cpp b/src/kernel/context/ContextThread.cpp index f7914a6fc9..f5a1f7a5e6 100644 --- a/src/kernel/context/ContextThread.cpp +++ b/src/kernel/context/ContextThread.cpp @@ -66,7 +66,7 @@ ThreadContext::ThreadContext(std::function&& code, actor::ActorImpl* act if (has_code()) { /* create and start the actor */ this->thread_ = new std::thread(ThreadContext::wrapper, this); - /* wait the starting of the newly created actor */ + /* wait the start of the newly created actor */ this->end_.acquire(); } @@ -97,10 +97,8 @@ void ThreadContext::wrapper(ThreadContext* context) try { (*context)(); - if (not context->is_maestro()) { // Just in case somebody detached maestro - context->Context::stop(); - context->stop_hook(); - } + if (not context->is_maestro()) // Just in case somebody detached maestro + context->stop(); } catch (ForcefulKillException const&) { XBT_DEBUG("Caught a ForcefulKillException in Thread::wrapper"); xbt_assert(not context->is_maestro(), "Maestro shall not receive ForcefulKillExceptions, even when detached."); @@ -140,13 +138,6 @@ void ThreadContext::yield() this->end_.release(); } -void ThreadContext::stop() -{ - Context::stop(); - stop_hook(); - throw ForcefulKillException(); -} - void ThreadContext::suspend() { this->yield();