ThreadWeaver
WeaverInterface.h
Go to the documentation of this file.
A Job is a simple abstraction of an action that is to be executed in a thread context.
Definition Job.h:66
We use a State pattern to handle the system state in ThreadWeaver.
Definition State.h:74
virtual void requestAbort()=0
Request aborts of the currently executed jobs.
virtual int currentNumberOfThreads() const =0
Returns the current number of threads in the inventory.
virtual ~WeaverInterface()
Definition WeaverInterface.h:69
void finished()
This signal is emitted when the Weaver has finished ALL currently queued jobs.
virtual void finish()=0
Finish all queued operations, then return.
virtual void setMaximumNumberOfThreads(int cap)=0
Set the maximum number of threads this Weaver object may start.
void jobDone(ThreadWeaver::Job *)
This signal is emitted when a job is finished.
virtual const State & state() const =0
Return the state of the weaver object.
virtual int queueLength() const =0
Returns the number of pending jobs.
void stateChanged(ThreadWeaver::State *)
The Weaver's state has changed.
WeaverInterface(QObject *parent=0)
A ThreadWeaver object manages a queue of Jobs.
Definition WeaverInterface.cpp:33
virtual void registerObserver(WeaverObserver *)=0
Register an observer.
virtual int maximumNumberOfThreads() const =0
Get the maximum number of threads this Weaver may start.
Observers provides signals on some Weaver events that are otherwise only available through objects of...
Definition WeaverObserver.h:59
Definition DebuggingAids.h:51
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.