ThreadWeaver
#include <State.h>
Public Member Functions | |
State (WeaverInterface *weaver) | |
virtual | ~State () |
virtual void | activated () |
virtual Job * | applyForWork (Thread *th, Job *previous)=0 |
virtual void | resume ()=0 |
virtual StateId | stateId () const =0 |
QString | stateName () const |
virtual void | suspend ()=0 |
virtual void | waitForAvailableJob (Thread *th)=0 |
Protected Member Functions | |
WeaverInterface * | weaver () |
Protected Attributes | |
Private *const | d |
Detailed Description
We use a State pattern to handle the system state in ThreadWeaver.
Constructor & Destructor Documentation
|
explicit |
Member Function Documentation
|
virtual |
The state has been changed so that this object is responsible for state handling.
Reimplemented in ThreadWeaver::SuspendingState, and ThreadWeaver::WorkingHardState.
Assign a job to an idle thread.
- Parameters
-
th the thread to give a new Job to previous the job this thread finished before calling
Implemented in ThreadWeaver::InConstructionState, ThreadWeaver::SuspendingState, ThreadWeaver::DestructedState, ThreadWeaver::ShuttingDownState, ThreadWeaver::SuspendedState, and ThreadWeaver::WorkingHardState.
|
pure virtual |
Resume job processing.
Implemented in ThreadWeaver::InConstructionState, ThreadWeaver::SuspendingState, ThreadWeaver::DestructedState, ThreadWeaver::ShuttingDownState, ThreadWeaver::SuspendedState, and ThreadWeaver::WorkingHardState.
|
pure virtual |
QString State::stateName | ( | ) | const |
|
pure virtual |
Suspend job processing.
Implemented in ThreadWeaver::InConstructionState, ThreadWeaver::SuspendingState, ThreadWeaver::DestructedState, ThreadWeaver::ShuttingDownState, ThreadWeaver::SuspendedState, and ThreadWeaver::WorkingHardState.
|
pure virtual |
Wait (by suspending the calling thread) until a job becomes available.
Implemented in ThreadWeaver::InConstructionState, ThreadWeaver::SuspendingState, ThreadWeaver::DestructedState, ThreadWeaver::ShuttingDownState, ThreadWeaver::SuspendedState, and ThreadWeaver::WorkingHardState.
|
protected |
Member Data Documentation
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.