ThreadWeaver
queue.h
24 * Queues process jobs enqueued in them by automatically assigning them to worker threads they manage.
25 * Applications using ThreadWeaver can make use of a global Queue which is instantiated on demand, or
26 * create multiple queues as needed. A job assigned to a queue will be processed by that specific queue.
A Job is a simple abstraction of an action that is to be executed in a thread context.
Definition job.h:47
QueueSignals(QObject *parent=nullptr)
Construct a QueueSignals object, passing the QObject parent.
Definition queuesignals.cpp:15
QueueStream implements a stream based API to access ThreadWeaver queues.
Definition queuestream.h:22
void setMaximumNumberOfThreads(int cap) override
Set the maximum number of threads this Weaver object may start.
Definition queue.cpp:217
int maximumNumberOfThreads() const override
Get the maximum number of threads this Weaver may start.
Definition queue.cpp:227
int currentNumberOfThreads() const override
Returns the current number of threads in the inventory.
Definition queue.cpp:222
static void setGlobalQueueFactory(GlobalQueueFactory *factory)
Set the factory object that will create the global queue.
Definition queue.cpp:94
void enqueue(const QList< JobPointer > &jobs) override
Queue a vector of jobs.
Definition queue.cpp:167
We use a State pattern to handle the system state in ThreadWeaver.
Definition state.h:56
void suspend()
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 11:57:50 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 11:57:50 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.