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(std::string mailbox_name, OperationType operation_type) : mailbox_name(mailbox_name), operation_type(operation_type) {}
49 std::unique_ptr<SimulationMessage> wait();
51 static unsigned long waitForSomethingToHappen(
52 std::vector<std::shared_ptr<S4U_PendingCommunication>> pending_comms,
55 static unsigned long waitForSomethingToHappen(
56 std::vector<S4U_PendingCommunication*> pending_comms,
62 simgrid::s4u::CommPtr comm_ptr;
64 std::unique_ptr<SimulationMessage> simulation_message;
66 std::string mailbox_name;
68 OperationType operation_type;
78 #endif //WRENCH_S4U_PENDINGCOMMUNICATION_H