- char* res = static_cast<char*>(simgrid::s4u::this_actor::recv(mailbox));
- xbt_assert(res != nullptr, "MSG_task_get failed");
-
- if (strcmp(res, "finalize") == 0) { /* - Exit if 'finalize' is received */
- xbt_free(res);
+ double* task = static_cast<double*>(mailbox->get());
+ xbt_assert(task != nullptr, "mailbox->get() failed");
+ double comp_size = *task;
+ delete task;
+ if (comp_size < 0) { /* - Exit when -1.0 is received */
+ XBT_INFO("I'm done. See you!");