QueueSignals declares the Qt signals shared by the Queue and Weaver classes.
More...
#include <queuesignals.h>
|
| QueueSignals (QObject *parent=nullptr) |
|
| QueueSignals (ThreadWeaver::Private::QueueSignals_Private *d, QObject *parent=nullptr) |
|
virtual int | currentNumberOfThreads () const =0 |
| Returns the current number of threads in the inventory.
|
|
virtual void | dequeue ()=0 |
| Remove all queued jobs.
|
|
virtual bool | dequeue (const JobPointer &job)=0 |
| Remove a job from the queue.
|
|
virtual void | enqueue (const QVector< JobPointer > &jobs)=0 |
| Queue a vector of jobs.
|
|
virtual void | finish ()=0 |
| Finish all queued operations, then return.
|
|
virtual bool | isEmpty () const =0 |
| Is the queue empty? The queue is empty if no more jobs are queued.
|
|
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.
|
|
virtual int | maximumNumberOfThreads () const =0 |
| Get the maximum number of threads this Weaver may start.
|
|
virtual int | queueLength () const =0 |
| Returns the number of pending jobs.
|
|
virtual void | requestAbort ()=0 |
| Request aborts of the currently executed jobs.
|
|
virtual void | reschedule ()=0 |
| Reschedule the jobs in the queue.
|
|
virtual void | resume ()=0 |
| Resume job queueing.
|
|
virtual void | setMaximumNumberOfThreads (int cap)=0 |
| Set the maximum number of threads this Weaver object may start.
|
|
virtual void | shutDown ()=0 |
| Shut down the queue.
|
|
virtual const State * | state () const =0 |
| Return the state of the weaver object.
|
|
virtual void | suspend ()=0 |
| Suspend job execution.
|
|
|
ThreadWeaver::Private::QueueSignals_Private * | d () |
|
const ThreadWeaver::Private::QueueSignals_Private * | d () const |
|
QueueSignals declares the Qt signals shared by the Queue and Weaver classes.
◆ finished
void ThreadWeaver::QueueSignals::finished |
( |
| ) |
|
|
signal |
Emitted when the Queue has completed all jobs currently queued.
The Queue emits finished() when the job queue is empty, and the last job currently processed by a worker threads was completed. Beware that if multiple jobs are enqueued repeatedly one by one, this signal might be emitted multiple times, because the queued jobs where processed before new ones could be queued. To avoid this, queue all relevant jobs in a single operation, using for example a QueueStream or a Collection.
◆ stateChanged
Emitted when the processing state of the Queue has changed.
◆ suspended
void ThreadWeaver::QueueSignals::suspended |
( |
| ) |
|
|
signal |
The Queue has been suspended.
When the Queue is suspended, worker threads will not be assigned new jobs to process. Jobs waiting in the queue will not be started until processing is resumed. When suspend() is called, the worker threads will continue to process the job currently assigned to them. When the last thread finishes it's current assignment, suspended() is emitted.
- See also
- suspend()