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
WeaverInterface provides a common interface for weaver implementations.
Definition WeaverInterface.h:61
virtual bool isEmpty() const =0
Is the queue empty? The queue is empty if no more jobs are queued.
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.
virtual void registerObserver(WeaverObserver *)=0
Register an observer.
virtual int maximumNumberOfThreads() const =0
Get the maximum number of threads this Weaver may start.
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...
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-2024 The KDE developers.
Generated on Thu Jul 18 2024 00:00:00 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Jul 18 2024 00:00:00 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.