Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Keep tutorial examples simple; don't use Mailbox::get_unique.
[simgrid.git] / docs / source / tuto_s4u / master-workers-lab4.cpp
index c2c8f4d3b2550400fa5837745d567e948f2f6a9f..7752e31f2e4acb6b32602b8c9d69bf7cd5427c1d 100644 (file)
@@ -22,8 +22,9 @@ static void worker(std::string category)
   simgrid::s4u::Mailbox* mailbox   = simgrid::s4u::Mailbox::by_name(mailbox_name);
 
   while (true) { // Master forcefully kills the workers by the end of the simulation
   simgrid::s4u::Mailbox* mailbox   = simgrid::s4u::Mailbox::by_name(mailbox_name);
 
   while (true) { // Master forcefully kills the workers by the end of the simulation
-    auto msg            = mailbox->get_unique<double>();
+    double* msg         = mailbox->get<double>();
     double compute_cost = *msg;
     double compute_cost = *msg;
+    delete msg;
 
     // simgrid::s4u::this_actor::exec_init(compute_cost)->set_tracing_category(category)->wait();
     /* Long form:*/
 
     // simgrid::s4u::this_actor::exec_init(compute_cost)->set_tracing_category(category)->wait();
     /* Long form:*/