This is a simple wrapper class around S4U asynchronous communication checking methods.
More...
#include <S4U_PendingCommunication.h>
|
enum | OperationType { SENDING,
RECEIVING
} |
| The communication operation's type.
|
|
This is a simple wrapper class around S4U asynchronous communication checking methods.
◆ S4U_PendingCommunication()
wrench::S4U_PendingCommunication::S4U_PendingCommunication |
( |
std::string |
mailbox_name, |
|
|
OperationType |
operation_type |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
mailbox_name | the mailbox name |
operation_type | the operation type |
◆ 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< S4U_PendingCommunication * > |
pending_comms, |
|
|
double |
timeout |
|
) |
| |
|
static |
Wait for any pending communication completion.
- Parameters
-
pending_comms | a list of pending communications |
timeout | timeout value in seconds (-1 means no timeout) |
- Returns
- the index of the comm to which something happened (success or failure), or ULONG_MAX if nothing happened before the timeout expired
- Exceptions
-
◆ waitForSomethingToHappen() [2/2]
unsigned long wrench::S4U_PendingCommunication::waitForSomethingToHappen |
( |
std::vector< std::shared_ptr< S4U_PendingCommunication >> |
pending_comms, |
|
|
double |
timeout |
|
) |
| |
|
static |
Wait for any pending communication completion.
- Parameters
-
pending_comms | a list of pending communications |
timeout | timeout value in seconds (-1 means no timeout) |
- Returns
- the index of the comm to which something happened (success or failure)
- Exceptions
-
The documentation for this class was generated from the following files: