wrench::S4U_PendingCommunication Class Reference

This is a simple wrapper class around S4U asynchronous communication checking methods. More...

#include <S4U_PendingCommunication.h>

Public Member Functions

 S4U_PendingCommunication (std::string mailbox)
 Constructor. More...
 
std::unique_ptr< SimulationMessagewait ()
 Wait for the pending communication to complete. More...
 

Static Public Member Functions

static unsigned long waitForSomethingToHappen (std::vector< std::unique_ptr< S4U_PendingCommunication >> pending_comms, double timeout)
 Wait for any pending communication completion. More...
 
static unsigned long waitForSomethingToHappen (std::vector< S4U_PendingCommunication *> pending_comms, double timeout)
 Wait for any pending communication completion. More...
 

Public Attributes

simgrid::s4u::CommPtr comm_ptr
 The SimGrid communication handle.
 
std::string mailbox_name
 The mailbox name.
 
std::unique_ptr< SimulationMessagesimulation_message
 The message.
 

Detailed Description

This is a simple wrapper class around S4U asynchronous communication checking methods.

Constructor & Destructor Documentation

◆ S4U_PendingCommunication()

wrench::S4U_PendingCommunication::S4U_PendingCommunication ( std::string  mailbox)

Constructor.

Parameters
mailboxa mailbox name

Member Function Documentation

◆ wait()

std::unique_ptr< SimulationMessage > wrench::S4U_PendingCommunication::wait ( )

Wait for the pending communication to complete.

Returns
A (unique pointer to a) simulation message
Exceptions
std::shared_ptr<NetworkError>

◆ waitForSomethingToHappen() [1/2]

unsigned long wrench::S4U_PendingCommunication::waitForSomethingToHappen ( std::vector< std::unique_ptr< S4U_PendingCommunication >>  pending_comms,
double  timeout 
)
static

Wait for any pending communication completion.

Parameters
pending_commsa list of pending communications
timeouttimeout value in seconds (-1 means no timeout)
Returns
the index of the comm to which something happened (success or failure)
Exceptions
std::invalid_argument

◆ waitForSomethingToHappen() [2/2]

unsigned long wrench::S4U_PendingCommunication::waitForSomethingToHappen ( std::vector< S4U_PendingCommunication *>  pending_comms,
double  timeout 
)
static

Wait for any pending communication completion.

Parameters
pending_commsa list of pending communications
timeouttimeout value in seconds (-1 means no timeout)
Returns
the index of the comm to which something happened (success or failure)
Exceptions
std::invalid_argument

The documentation for this class was generated from the following files:
  • /Users/rafsilva/Documents/isi/workspace/wrench/wrench/include/wrench/simgrid_S4U_util/S4U_PendingCommunication.h
  • /Users/rafsilva/Documents/isi/workspace/wrench/wrench/src/wrench/simgrid_S4U_util/S4U_PendingCommunication.cpp