static int smx_ctx_sysv_factory_finalize(smx_context_factory_t *factory)
{ 
#ifdef CONTEXT_THREADS
  if (sysv_parmap)
    xbt_parmap_destroy(sysv_parmap);
  xbt_free(sysv_workers_context);
#endif
  return smx_ctx_base_factory_finalize(factory);
}
static int smx_ctx_boost_factory_finalize(smx_context_factory_t *factory)
{
#ifdef CONTEXT_THREADS
  if (boost_parmap) {
    xbt_parmap_destroy(boost_parmap);
    boost_parmap = nullptr;
  }
  xbt_free(boost_workers_context);
  boost_workers_context = nullptr;
#endif
  return smx_ctx_base_factory_finalize(factory);
}