Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
lm::main::SignalHandler Class Reference

A thread safe Worker thread type that captures SIG* type signals over the various threads. More...

#include <SignalHandler.h>

Inheritance diagram for lm::main::SignalHandler:
[legend]
Collaboration diagram for lm::main::SignalHandler:
[legend]

Public Member Functions

 SignalHandler ()
 Create a SignalHandler.
virtual ~SignalHandler ()
virtual void wake ()
 Wake a sleeping Signalhandler.
Public Member Functions inherited from lm::thread::Worker
 Worker ()
 Creates thread and attaches it to the manager.
virtual ~Worker ()
 Removes thread from manager and deletes thread.
virtual void abort ()
 Set the aborted status for a thread and wakes thread.
virtual void checkpoint ()
 Checkpoint (currently unimplemented)
Public Member Functions inherited from lm::thread::Thread
 Thread ()
 Creates a pthread locking mechanism and initializes "Thread".
virtual ~Thread ()
 Destory the Thread.
virtual void start ()
 If no thread exists, creates a new thread and begins execution.
virtual void stop ()
 Joins the thread with the parent waiting if necessary.
virtual pthread_t getId ()
 Returns the pthread based id for the Thread.
virtual void setAffinity (int cpuNumber)
 Binds the thread to a CPU core.

Protected Member Functions

virtual int run ()
 Run the SignalHandler thread so that it can catch signals.

Additional Inherited Members

Protected Attributes inherited from lm::thread::Worker
volatile bool aborted
Protected Attributes inherited from lm::thread::Thread
pthread_mutex_t controlMutex
pthread_t threadId
volatile bool running
int cpuNumber

Detailed Description

A thread safe Worker thread type that captures SIG* type signals over the various threads.

Constructor & Destructor Documentation

◆ SignalHandler()

lm::main::SignalHandler::SignalHandler ( )

Create a SignalHandler.

◆ ~SignalHandler()

lm::main::SignalHandler::~SignalHandler ( )
virtual

Member Function Documentation

◆ run()

int lm::main::SignalHandler::run ( )
protectedvirtual

Run the SignalHandler thread so that it can catch signals.

Returns
0 on success, -1 on failure

Implements lm::thread::Thread.

Here is the call graph for this function:

◆ wake()

void lm::main::SignalHandler::wake ( )
virtual

Wake a sleeping Signalhandler.

Implements lm::thread::Thread.


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