- SIMIX_timer_set(start_time, [=]() {
- simix_global->create_process_function(
- arg->name.c_str(),
- std::move(arg->code),
- arg->data,
- arg->host,
- arg->kill_time,
- arg->properties,
- arg->auto_restart,
- nullptr);
+ SIMIX_timer_set(start_time, [arg, auto_restart]() {
+ smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), std::move(arg->code), arg->data,
+ arg->host, arg->properties, nullptr);
+ if (arg->kill_time >= 0)
+ simcall_process_set_kill_time(actor, arg->kill_time);
+ if (auto_restart)
+ SIMIX_process_auto_restart_set(actor, auto_restart);