Public Member Functions | Private Attributes | List of all members
HardWorker Class Reference
Inheritance diagram for HardWorker:
Inheritance graph
[legend]

Public Member Functions

bool getHasWorked ()
 
 HardWorker ()
 
bool shutdown () override
 
void work () override
 
 ~HardWorker () override=default
 
- Public Member Functions inherited from RunnableService
std::string getStatusString () override
 
virtual bool isRunning ()
 
void join ()
 
 RunnableService ()
 
bool start () override
 
void waitForShutdown ()
 
void waitForShutdown (std::chrono::milliseconds millis)
 
 ~RunnableService () override=default
 
- Public Member Functions inherited from Service
ServiceState getState ()
 
 Service ()
 
virtual ~Service ()=default
 

Private Attributes

bool has_worked_
 
std::condition_variable test_cv
 
std::mutex test_mtx
 

Additional Inherited Members

- Protected Member Functions inherited from RunnableService
virtual void run ()
 
virtual bool startWorkerThread ()
 
virtual bool stopWorkerThread ()
 
- Protected Member Functions inherited from Service
void setState (ServiceState new_state)
 

Detailed Description

Simple extension of the RunnableService used for testing

Definition at line 27 of file runnable_service_test.cpp.

Constructor & Destructor Documentation

◆ HardWorker()

HardWorker::HardWorker ( )
inline

Definition at line 30 of file runnable_service_test.cpp.

◆ ~HardWorker()

HardWorker::~HardWorker ( )
overridedefault

Member Function Documentation

◆ getHasWorked()

bool HardWorker::getHasWorked ( )
inline

Definition at line 50 of file runnable_service_test.cpp.

◆ shutdown()

bool HardWorker::shutdown ( )
inlineoverridevirtual

Stops the worker thread. Should be overridden if other actions are necessary to stop.

Returns

Reimplemented from RunnableService.

Definition at line 36 of file runnable_service_test.cpp.

◆ work()

void HardWorker::work ( )
inlineoverridevirtual

Implement this method to do work. Note: this method is assumed to NOT block, otherwise shutdown does nothing.

Implements RunnableService.

Definition at line 42 of file runnable_service_test.cpp.

Member Data Documentation

◆ has_worked_

bool HardWorker::has_worked_
private

Definition at line 54 of file runnable_service_test.cpp.

◆ test_cv

std::condition_variable HardWorker::test_cv
private

Definition at line 55 of file runnable_service_test.cpp.

◆ test_mtx

std::mutex HardWorker::test_mtx
mutableprivate

Definition at line 56 of file runnable_service_test.cpp.


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


dataflow_lite
Author(s): AWS RoboMaker
autogenerated on Mon Feb 28 2022 22:01:57