SimGrid  3.14.159
Versatile Simulation of Distributed Systems
simgrid::s4u::this_actor Namespace Reference

Detailed Description

Static methods working on the current actor (see s4u::Actor)

Functions

void sleep_for (double duration)
 Block the actor sleeping for that amount of seconds (may throws hostFailure) More...
 
void sleep_until (double timeout)
 
template<class Rep , class Period >
void sleep_for (std::chrono::duration< Rep, Period > duration)
 
template<class Duration >
void sleep_until (const SimulationTimePoint< Duration > &timeout_time)
 
void sleep (double duration)
 
e_smx_state_t execute (double flop)
 Block the actor, computing the given amount of flops. More...
 
voidrecv (MailboxPtr chan)
 Block the actor until it gets a message from the given mailbox. More...
 
void send (MailboxPtr chan, void *payload, size_t simulatedSize)
 Block the actor until it delivers a message of the given simulated size to the given mailbox. More...
 
int getPid ()
 Return the PID of the current actor. More...
 
int getPpid ()
 Return the PPID of the current actor. More...
 

Function Documentation

◆ sleep_for() [1/2]

void simgrid::s4u::this_actor::sleep_for ( double  duration)

Block the actor sleeping for that amount of seconds (may throws hostFailure)

Examples:
examples/s4u/mutex/s4u_mutex.cpp.

◆ sleep_until() [1/2]

void simgrid::s4u::this_actor::sleep_until ( double  timeout)

◆ sleep_for() [2/2]

template<class Rep , class Period >
void simgrid::s4u::this_actor::sleep_for ( std::chrono::duration< Rep, Period >  duration)
inline

◆ sleep_until() [2/2]

template<class Duration >
void simgrid::s4u::this_actor::sleep_until ( const SimulationTimePoint< Duration > &  timeout_time)
inline

◆ sleep()

void simgrid::s4u::this_actor::sleep ( double  duration)
inline

◆ execute()

e_smx_state_t simgrid::s4u::this_actor::execute ( double  flop)

Block the actor, computing the given amount of flops.

◆ recv()

void * simgrid::s4u::this_actor::recv ( MailboxPtr  chan)

Block the actor until it gets a message from the given mailbox.

See Comm for the full communication API (including non blocking communications).

Examples:
examples/s4u/launching/s4u_launching.cpp.

◆ send()

void simgrid::s4u::this_actor::send ( MailboxPtr  chan,
void payload,
size_t  simulatedSize 
)

Block the actor until it delivers a message of the given simulated size to the given mailbox.

See Comm for the full communication API (including non blocking communications).

Examples:
examples/s4u/launching/s4u_launching.cpp.

◆ getPid()

int simgrid::s4u::this_actor::getPid ( )

Return the PID of the current actor.

◆ getPpid()

int simgrid::s4u::this_actor::getPpid ( )

Return the PPID of the current actor.