ThreadWeaver
ThreadWeaver.cpp
Go to the documentation of this file.
bool isEmpty() const
Is the queue empty? The queue is empty if no more jobs are queued.
Definition: ThreadWeaver.cpp:127
virtual WeaverInterface * makeWeaverImpl()
The factory method to create the actual Weaver implementation.
Definition: ThreadWeaver.cpp:65
The Weaver class provides the public implementation of the WeaverInterface.
Definition: ThreadWeaver.h:65
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
We use a State pattern to handle the system state in ThreadWeaver.
Definition: State.h:73
int currentNumberOfThreads() const
Returns the current number of threads in the inventory.
Definition: ThreadWeaver.cpp:147
void setMaximumNumberOfThreads(int cap)
Set the maximum number of threads this Weaver object may start.
Definition: ThreadWeaver.cpp:142
WeaverInterface provides a common interface for weaver implementations.
Definition: WeaverInterface.h:61
A Job is a simple abstraction of an action that is to be executed in a thread context.
Definition: Job.h:65
Observers provides signals on some Weaver events that are otherwise only available through objects of...
Definition: WeaverObserver.h:58
int maximumNumberOfThreads() const
Get the maximum number of threads this Weaver may start.
Definition: ThreadWeaver.cpp:152
void jobDone(ThreadWeaver::Job *)
This signal is emitted when a job is finished.
void finished()
This signal is emitted when the Weaver has finished ALL currently queued jobs.
A WeaverImpl is the manager of worker threads (Thread objects) to which it assigns jobs from its queu...
Definition: WeaverImpl.h:51
static ThreadWeaver::Weaver * instance()
Return the global Weaver instance.
Definition: ThreadWeaver.cpp:80
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.