SimGrid  3.16
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

Public Member Functions

 ThreadContext (std::function< void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process, bool maestro=false)
 
 ~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...
 
void start ()
 
- 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 ()
 

Public Attributes

friend ThreadContextFactory
 
- 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 = false 
)

◆ ~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.

◆ start()

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

Member Data Documentation

◆ ThreadContextFactory

friend simgrid::kernel::context::ThreadContext::ThreadContextFactory

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