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 c2c8f4d..7752e31 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
-    auto msg            = mailbox->get_unique<double>();
+    double* msg         = mailbox->get<double>();
     double compute_cost = *msg;
+    delete msg;
 
     // simgrid::s4u::this_actor::exec_init(compute_cost)->set_tracing_category(category)->wait();
     /* Long form:*/