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.");
TRACE_category_with_color("finalize", "0 1 0"); // finalize is green
// categories without user-defined colors receive random colors generated by the tracing system
TRACE_category("request");
- TRACE_category_with_color("report", NULL);
+ TRACE_category_with_color("report", nullptr);
e.register_function("master", &master);
e.register_function("worker", &worker);