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

An actual worker Thread that runs a simulation replicate. More...

#include <Worker.h>

Inheritance diagram for lm::thread::Worker:
[legend]
Collaboration diagram for lm::thread::Worker:
[legend]

Public Member Functions

 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 void wake ()=0
 Wakes a sleeping thead.
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 Attributes

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

Additional Inherited Members

Protected Member Functions inherited from lm::thread::Thread
virtual int run ()=0

Detailed Description

An actual worker Thread that runs a simulation replicate.

Constructor & Destructor Documentation

◆ Worker()

lm::thread::Worker::Worker ( )

Creates thread and attaches it to the manager.

Here is the call graph for this function:

◆ ~Worker()

lm::thread::Worker::~Worker ( )
virtual

Removes thread from manager and deletes thread.

Here is the call graph for this function:

Member Function Documentation

◆ abort()

void lm::thread::Worker::abort ( )
virtual

Set the aborted status for a thread and wakes thread.

Reimplemented in lm::main::LocalDataOutputWorker.

Here is the call graph for this function:

◆ checkpoint()

void lm::thread::Worker::checkpoint ( )
virtual

Checkpoint (currently unimplemented)

Reimplemented in lm::main::LocalDataOutputWorker.

Member Data Documentation

◆ aborted

volatile bool lm::thread::Worker::aborted
protected

The documentation for this class was generated from the following files:
  • /data2/LM_zls_github/Lattice-Microbes/src/thread/Worker.h
  • /data2/LM_zls_github/Lattice-Microbes/src/thread/Worker.cpp