TRACE_host_variable_set(my_hostname, "task_computation", 0);
while (true) {
- const auto* task = static_cast<Task*>(mailbox->get());
+ auto task = mailbox->get_unique<Task>();
if (task->name == "finalize") {
- delete task;
break;
}
// adding the task's cost to the variable "task_computation"
->set_name(task->name)
->set_tracing_category(task->category)
->wait();
- delete task;
}
XBT_DEBUG("Exiting now.");