while (simgrid::s4u::Engine::getClock() < deadline) {
if (comm == nullptr)
comm = mailbox->get_async(&received);
if (comm->test()) {
// Retrieve the data sent by the peer.
while (simgrid::s4u::Engine::getClock() < deadline) {
if (comm == nullptr)
comm = mailbox->get_async(&received);
if (comm->test()) {
// Retrieve the data sent by the peer.