-}
-
-void BoostSerialContext::suspend()
-{
- /* determine the next context */
- BoostSerialContext* next_context = nullptr;
- unsigned long int i = process_index_++;
-
- if (i < xbt_dynar_length(simix_global->process_to_run)) {
- /* execute the next process */
- XBT_DEBUG("Run next process");
- next_context = static_cast<BoostSerialContext*>(xbt_dynar_get_as(
- simix_global->process_to_run, i, smx_process_t)->context);
- }
- else {
- /* all processes were run, return to maestro */
- XBT_DEBUG("No more process to run");
- next_context = static_cast<BoostSerialContext*>(
- maestro_context_);
- }
- SIMIX_context_set_current((smx_context_t) next_context);
- #if HAVE_BOOST_CONTEXTS == 1
- boost::context::jump_fcontext(
- this->fc_, next_context->fc_, (intptr_t) next_context);
- #else
- boost::context::jump_fcontext(
- &this->fc_, next_context->fc_, (intptr_t) next_context);
- #endif
-}
-
-void BoostSerialContext::stop()
-{
- BoostContext::stop();
- this->suspend();
-}
-
-// BoostParallelContext
-
-#if HAVE_THREAD_CONTEXTS
-
-void BoostParallelContext::suspend()
-{
- smx_process_t next_work = (smx_process_t) xbt_parmap_next(parmap_);
- BoostParallelContext* next_context = nullptr;
-
- if (next_work != nullptr) {
- XBT_DEBUG("Run next process");
- next_context = static_cast<BoostParallelContext*>(next_work->context);
+ try {
+ (*context)();
+ } catch (StopRequest const&) {
+ XBT_DEBUG("Caught a StopRequest");
+ } catch (simgrid::Exception const& e) {
+ XBT_INFO("Actor killed by an uncatched exception %s", simgrid::xbt::demangle(typeid(e).name()).get());
+ throw;