11 #ifndef WRENCH_S4U_PENDINGCOMMUNICATION_H
12 #define WRENCH_S4U_PENDINGCOMMUNICATION_H
16 #include <simgrid/s4u/Comm.hpp>
17 #include "wrench/util/MessageManager.h"
23 class SimulationMessage;
30 class S4U_PendingCommunication {
47 S4U_PendingCommunication(simgrid::s4u::Mailbox *mailbox, OperationType operation_type) : mailbox(mailbox), operation_type(operation_type) {}
49 std::unique_ptr<SimulationMessage> wait();
50 std::unique_ptr<SimulationMessage> wait(
double timeout);
52 static unsigned long waitForSomethingToHappen(
53 std::vector<std::shared_ptr<S4U_PendingCommunication>> pending_comms,
56 static unsigned long waitForSomethingToHappen(
57 std::vector<S4U_PendingCommunication*> pending_comms,
63 simgrid::s4u::CommPtr comm_ptr;
65 std::unique_ptr<SimulationMessage> simulation_message;
67 simgrid::s4u::Mailbox *mailbox;
69 OperationType operation_type;
79 #endif //WRENCH_S4U_PENDINGCOMMUNICATION_H