ThreadWeaver
ThreadWeaver.cpp
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
A WeaverImpl is the manager of worker threads (Thread objects) to which it assigns jobs from its queu...
Definition: WeaverImpl.h:52
WeaverInterface provides a common interface for weaver implementations.
Definition: WeaverInterface.h:61
void finished()
This signal is emitted when the Weaver has finished ALL currently queued jobs.
void jobDone(ThreadWeaver::Job *)
This signal is emitted when a job is finished.
Observers provides signals on some Weaver events that are otherwise only available through objects of...
Definition: WeaverObserver.h:59
The Weaver class provides the public implementation of the WeaverInterface.
Definition: ThreadWeaver.h:66
virtual WeaverInterface * makeWeaverImpl()
The factory method to create the actual Weaver implementation.
Definition: ThreadWeaver.cpp:65
static ThreadWeaver::Weaver * instance()
Return the global Weaver instance.
Definition: ThreadWeaver.cpp:80
void setMaximumNumberOfThreads(int cap)
Set the maximum number of threads this Weaver object may start.
Definition: ThreadWeaver.cpp:142
bool isIdle() const
Is the weaver idle? The weaver is idle if no jobs are queued and no jobs are processed by the threads...
Definition: ThreadWeaver.cpp:132
bool isEmpty() const
Is the queue empty? The queue is empty if no more jobs are queued.
Definition: ThreadWeaver.cpp:127
int maximumNumberOfThreads() const
Get the maximum number of threads this Weaver may start.
Definition: ThreadWeaver.cpp:152
int currentNumberOfThreads() const
Returns the current number of threads in the inventory.
Definition: ThreadWeaver.cpp:147
Definition: DebuggingAids.h:51
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.