-/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
{
auto mbox = simgrid::s4u::Mailbox::by_name("master_mailbox");
while (true) {
- const auto* task = mbox->get<Task>();
+ auto task = mbox->get_unique<Task>();
if (task->name == "finalize") {
- delete task;
break;
}
// creating task and setting its category
->set_name(task->name)
->set_tracing_category(task->category)
->wait();
- delete task;
}
}