ThreadWeaver::ShuttingDownState

Search for usage in LXR

ThreadWeaver::ShuttingDownState Class Reference

#include <shuttingdownstate.h>

Inheritance diagram for ThreadWeaver::ShuttingDownState:

Public Member Functions

 ShuttingDownState (QueueSignals *weaver)
 
JobPointer applyForWork (Thread *th, bool wasBusy) override
 
void resume () override
 
void shutDown () override
 
StateId stateId () const override
 
void suspend () override
 
void waitForAvailableJob (Thread *th) override
 
- Public Member Functions inherited from ThreadWeaver::WeaverImplState
 WeaverImplState (QueueSignals *weaver)
 
int currentNumberOfThreads () const override
 
void dequeue () override
 
bool dequeue (const JobPointer &job) override
 
void enqueue (const QList< JobPointer > &jobs) override
 
void finish () override
 
bool isEmpty () const override
 
bool isIdle () const override
 
int maximumNumberOfThreads () const override
 
int queueLength () const override
 
void requestAbort () override
 
void reschedule () override
 
void setMaximumNumberOfThreads (int cap) override
 
void shutDown () override
 
const Statestate () const override
 
void waitForAvailableJob (Thread *th) override
 
- Public Member Functions inherited from ThreadWeaver::State
 State (QueueSignals *weaver)
 
 ~State () override
 
virtual void activated ()
 
QString stateName () const
 

Additional Inherited Members

- Protected Member Functions inherited from ThreadWeaver::WeaverImplState
const Weaverweaver () const override
 
Weaverweaver () override
 

Detailed Description

ShuttingDownState is enabled when the Weaver destructor is entered.

It prevents threads from still accessing queue management methods, and new jobs being queued.

Definition at line 23 of file shuttingdownstate.h.

Constructor & Destructor Documentation

◆ ShuttingDownState()

ThreadWeaver::ShuttingDownState::ShuttingDownState ( QueueSignals * weaver)
explicit

Definition at line 15 of file shuttingdownstate.cpp.

Member Function Documentation

◆ applyForWork()

JobPointer ThreadWeaver::ShuttingDownState::applyForWork ( Thread * th,
bool wasBusy )
override

Assign a job to an idle thread.

Definition at line 34 of file shuttingdownstate.cpp.

◆ resume()

void ThreadWeaver::ShuttingDownState::resume ( )
overridevirtual

Resume job processing.

Implements ThreadWeaver::QueueInterface.

Definition at line 29 of file shuttingdownstate.cpp.

◆ shutDown()

void ThreadWeaver::ShuttingDownState::shutDown ( )
overridevirtual

Shut down the queue.

Implements ThreadWeaver::QueueInterface.

Definition at line 20 of file shuttingdownstate.cpp.

◆ stateId()

StateId ThreadWeaver::ShuttingDownState::stateId ( ) const
overridevirtual

reimpl

Implements ThreadWeaver::State.

Definition at line 46 of file shuttingdownstate.cpp.

◆ suspend()

void ThreadWeaver::ShuttingDownState::suspend ( )
overridevirtual

Suspend job processing.

Implements ThreadWeaver::QueueInterface.

Definition at line 24 of file shuttingdownstate.cpp.

◆ waitForAvailableJob()

void ThreadWeaver::ShuttingDownState::waitForAvailableJob ( Thread * th)
override

Wait (by suspending the calling thread) until a job becomes available.

Definition at line 41 of file shuttingdownstate.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:31 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.