+
+ if(_surf_parallel_contexts){
+ tpool = xbt_tpool_new(2, 10);
+ (*factory)->runall = smx_ctx_sysv_runall_parallel;
+ }else{
+ (*factory)->runall = smx_ctx_sysv_runall;
+ }
+}
+
+int smx_ctx_sysv_factory_finalize(smx_context_factory_t *factory)
+{
+ if(tpool)
+ xbt_tpool_destroy(tpool);
+ return smx_ctx_base_factory_finalize(factory);