SimGrid  3.18
Versatile Simulation of Distributed Systems
simgrid::kernel::context::ThreadContext Class Reference

#include <ContextThread.hpp>

Inheritance diagram for simgrid::kernel::context::ThreadContext:
simgrid::kernel::context::AttachContext simgrid::kernel::context::Context simgrid::kernel::context::ParallelThreadContext simgrid::kernel::context::SerialThreadContext

Public Member Functions

 ThreadContext (std::function< void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process, bool maestro)
 
 ~ThreadContext () override
 
void stop () override
 
void suspend () override
 
void attach_start () override
 Called by the context when it is ready to give control to the maestro. More...
 
void attach_stop () override
 Called by the context when it has finished its job. More...
 
bool isMaestro () const
 
void release ()
 
void wait ()
 
- Public Member Functions inherited from simgrid::kernel::context::AttachContext
 AttachContext (std::function< void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process)
 
 ~AttachContext () override
 
- Public Member Functions inherited from simgrid::kernel::context::Context
 Context (std::function< void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process)
 
void operator() ()
 
bool has_code () const
 
smx_actor_t process ()
 
void set_cleanup (void_pfn_smxprocess_t cleanup)
 
virtual ~Context ()
 

Additional Inherited Members

- Public Attributes inherited from simgrid::kernel::context::Context
bool iwannadie
 

Constructor & Destructor Documentation

◆ ThreadContext()

simgrid::kernel::context::ThreadContext::ThreadContext ( std::function< void()>  code,
void_pfn_smxprocess_t  cleanup_func,
smx_actor_t  process,
bool  maestro 
)

◆ ~ThreadContext()

simgrid::kernel::context::ThreadContext::~ThreadContext ( )
override

Member Function Documentation

◆ stop()

void simgrid::kernel::context::ThreadContext::stop ( )
overridevirtual

Reimplemented from simgrid::kernel::context::Context.

◆ suspend()

void simgrid::kernel::context::ThreadContext::suspend ( )
overridevirtual

◆ attach_start()

void simgrid::kernel::context::ThreadContext::attach_start ( )
overridevirtual

Called by the context when it is ready to give control to the maestro.

Implements simgrid::kernel::context::AttachContext.

◆ attach_stop()

void simgrid::kernel::context::ThreadContext::attach_stop ( )
overridevirtual

Called by the context when it has finished its job.

Implements simgrid::kernel::context::AttachContext.

◆ isMaestro()

bool simgrid::kernel::context::ThreadContext::isMaestro ( ) const
inline

◆ release()

void simgrid::kernel::context::ThreadContext::release ( )

◆ wait()

void simgrid::kernel::context::ThreadContext::wait ( )

The documentation for this class was generated from the following files: