4 SPDX-FileCopyrightText: 2005-2013 Mirko Boehm <[email protected]>
20 class State;
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.
43 ~Queue() override;
45 QueueStream stream();
47 const State *state() const override;
53 static ThreadWeaver::Queue *instance();
54 void enqueue(const QVector<JobPointer> &jobs) override;
55 void enqueue(const JobPointer &job);
56 bool dequeue(const JobPointer &) override;
59 void suspend() override;
70 virtual ~GlobalQueueFactory()
75 static void setGlobalQueueFactory(GlobalQueueFactory *factory);
Interface for the global queue factory.
QueueStream implements a stream based API to access ThreadWeaver queues.
QueueSignals declares the Qt signals shared by the Queue and Weaver classes.
We use a State pattern to handle the system state in ThreadWeaver.