ThreadWeaver 5.109.0
|
SuspendingState is the state after suspend() has been called, but before all threads finished executing the current job and blocked. More...
#include <suspendingstate.h>
Public Member Functions | |
SuspendingState (Weaver *weaver) | |
void | activated () override |
Overload. | |
JobPointer | applyForWork (Thread *th, bool wasBusy) override |
Assign a job to an idle thread. | |
void | resume () override |
Resume job processing. | |
StateId | stateId () const override |
reimpl | |
void | suspend () override |
Suspend job processing. | |
![]() | |
WeaverImplState (QueueSignals *weaver) | |
int | currentNumberOfThreads () const override |
Returns the current number of threads in the inventory. | |
void | dequeue () override |
Dequeue all jobs. | |
bool | dequeue (const JobPointer &job) override |
Dequeue a job. | |
void | enqueue (const QVector< JobPointer > &jobs) override |
Enqueue a job. | |
void | finish () override |
Finish all queued jobs. | |
bool | isEmpty () const override |
Are no more jobs queued? | |
bool | isIdle () const override |
Are all threads waiting? | |
int | maximumNumberOfThreads () const override |
Get the maximum number of threads this Weaver may start. | |
int | queueLength () const override |
How many jobs are currently queued? | |
void | requestAbort () override |
Request abort for all queued and currently executed jobs. | |
void | reschedule () override |
Reschedule jobs to threads. | |
void | setMaximumNumberOfThreads (int cap) override |
Set the maximum number of threads this Weaver object may start. | |
void | shutDown () override |
Shut down the queue. | |
const State * | state () const override |
Return the state of the weaver object. | |
void | waitForAvailableJob (Thread *th) override |
Wait (by suspending the calling thread) until a job becomes available. | |
![]() | |
State (QueueSignals *weaver) | |
Default constructor. | |
~State () override | |
Destructor. | |
virtual void | activated () |
The state has been changed so that this object is responsible for state handling. | |
virtual StateId | stateId () const =0 |
The state Id. | |
QString | stateName () const |
The ID of the current state. | |
virtual int | currentNumberOfThreads () const =0 |
Returns the current number of threads in the inventory. | |
virtual void | dequeue ()=0 |
Remove all queued jobs. | |
virtual bool | dequeue (const JobPointer &job)=0 |
Remove a job from the queue. | |
virtual void | enqueue (const QVector< JobPointer > &jobs)=0 |
Queue a vector of jobs. | |
virtual void | finish ()=0 |
Finish all queued operations, then return. | |
virtual bool | isEmpty () const =0 |
Is the queue empty? The queue is empty if no more jobs are queued. | |
virtual bool | isIdle () const =0 |
Is the weaver idle? The weaver is idle if no jobs are queued and no jobs are processed by the threads. | |
virtual int | maximumNumberOfThreads () const =0 |
Get the maximum number of threads this Weaver may start. | |
virtual int | queueLength () const =0 |
Returns the number of pending jobs. | |
virtual void | requestAbort ()=0 |
Request aborts of the currently executed jobs. | |
virtual void | reschedule ()=0 |
Reschedule the jobs in the queue. | |
virtual void | resume ()=0 |
Resume job queueing. | |
virtual void | setMaximumNumberOfThreads (int cap)=0 |
Set the maximum number of threads this Weaver object may start. | |
virtual void | shutDown ()=0 |
Shut down the queue. | |
virtual const State * | state () const =0 |
Return the state of the weaver object. | |
virtual void | suspend ()=0 |
Suspend job execution. | |
Additional Inherited Members | |
![]() | |
const Weaver * | weaver () const override |
Weaver * | weaver () override |
Provide correct return type for WeaverImpl states. | |
virtual QueueInterface * | weaver () |
The Weaver interface this state handles. | |
virtual const QueueInterface * | weaver () const |
SuspendingState is the state after suspend() has been called, but before all threads finished executing the current job and blocked.
|
overridevirtual |
Overload.
Reimplemented from ThreadWeaver::State.
|
override |
Assign a job to an idle thread.
|
overridevirtual |
Resume job processing.
Implements ThreadWeaver::QueueInterface.
|
overridevirtual |
reimpl
Implements ThreadWeaver::State.
|
overridevirtual |
Suspend job processing.
Implements ThreadWeaver::QueueInterface.