Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix the API to isend detach() and speak about it in ChangeLog
[simgrid.git] / teshsuite / s4u / listen_async / listen_async.cpp
index 3b3b923..c4ad656 100644 (file)
@@ -31,7 +31,7 @@ static void server()
   simgrid::s4u::MailboxPtr mailbox2 = simgrid::s4u::Mailbox::byName("mailbox2");
   mailbox2->setReceiver(simgrid::s4u::Actor::self());
 
-  simgrid::s4u::this_actor::dsend(mailbox2, xbt_strdup("More data"), 0);
+  simgrid::s4u::this_actor::isend(mailbox2, xbt_strdup("More data"), 0)->detach();
 
   xbt_assert(mailbox2->listen()); // used to break.
   XBT_INFO("Task listen works on asynchronous mailboxes");
@@ -41,7 +41,6 @@ static void server()
   xbt_free(res);
 
   XBT_INFO("Data successfully received from asynchronous mailbox");
-  XBT_DEBUG("comm:%p", sendComm);
 }
 
 int main(int argc, char* argv[])
@@ -52,5 +51,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::createActor("test", simgrid::s4u::Host::by_name("Tremblay"), server);
 
   e->run();
+
+  delete e;
   return 0;
 }