Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
You don't send a mailbox, but instead put stuff on it
[simgrid.git] / teshsuite / s4u / listen_async / listen_async.cpp
index cfd9027..7e07dc9 100644 (file)
@@ -17,11 +17,11 @@ static void server()
 {
   simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName("mailbox");
 
-  simgrid::s4u::CommPtr sendComm = mailbox->send_async(xbt_strdup("Some data"), 0);
+  simgrid::s4u::CommPtr sendComm = mailbox->put_async(xbt_strdup("Some data"), 0);
 
   xbt_assert(mailbox->listen()); // True (1)
   XBT_INFO("Task listen works on regular mailboxes");
-  char* res = static_cast<char*>(mailbox->recv());
+  char* res = static_cast<char*>(mailbox->get());
 
   xbt_assert(not strcmp("Some data", res), "Data received: %s", res);
   XBT_INFO("Data successfully received from regular mailbox");
@@ -31,12 +31,12 @@ static void server()
   simgrid::s4u::MailboxPtr mailbox2 = simgrid::s4u::Mailbox::byName("mailbox2");
   mailbox2->setReceiver(simgrid::s4u::Actor::self());
 
-  mailbox2->send_init(xbt_strdup("More data"), 0)->detach();
+  mailbox2->put_init(xbt_strdup("More data"), 0)->detach();
 
   xbt_assert(mailbox2->listen()); // used to break.
   XBT_INFO("Task listen works on asynchronous mailboxes");
 
-  res = static_cast<char*>(mailbox2->recv());
+  res = static_cast<char*>(mailbox2->get());
   xbt_assert(not strcmp("More data", res));
   xbt_free(res);