ThreadWeaver

destructedstate.cpp
1 /* -*- C++ -*-
2  This file implements the DestructedState class.
3 
4  SPDX-FileCopyrightText: 2005-2013 Mirko Boehm <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 
8  $Id: DestructedState.cpp 30 2005-08-16 16:16:04Z mirko $
9 */
10 
11 #include "destructedstate.h"
12 
13 namespace ThreadWeaver
14 {
15 DestructedState::DestructedState(QueueSignals *)
16  : WeaverImplState(nullptr) // make sure we cannot use weaver, ever :-)
17 {
18 }
19 
21 {
22 }
23 
25 {
26  return nullptr;
27 }
28 
29 const Weaver *DestructedState::weaver() const
30 {
31  return nullptr;
32 }
33 
35 {
36 }
37 
39 {
40  return 0;
41 }
42 
44 {
45  return 0;
46 }
47 
49 {
50 }
51 
53 {
54  return false;
55 }
56 
58 {
59 }
60 
62 {
63 }
64 
66 {
67  return true;
68 }
69 
71 {
72  return true;
73 }
74 
76 {
77  return 0;
78 }
79 
81 {
82 }
83 
85 {
86 }
87 
89 {
90 }
91 
92 JobPointer DestructedState::applyForWork(Thread *, bool wasBusy)
93 {
94  Q_UNUSED(wasBusy) // except in Q_ASSERT
95  Q_ASSERT(wasBusy == false);
96  return JobPointer();
97 }
98 
99 void DestructedState::waitForAvailableJob(Thread *)
100 {
101 }
102 
104 {
105  return Destructed;
106 }
107 
108 }
int currentNumberOfThreads() const override
Returns the current number of threads in the inventory.
bool isEmpty() const override
Is the queue empty? The queue is empty if no more jobs are queued.
void finish() override
Finish all queued operations, then return.
void dequeue() override
Remove all queued jobs.
StateId stateId() const override
The state Id.
A Weaver manages worker threads.
Definition: weaver.h:34
void requestAbort() override
Request aborts of the currently executed jobs.
void enqueue(const QVector< JobPointer > &job) override
Queue a vector of jobs.
void setMaximumNumberOfThreads(int cap) override
Set the maximum number of threads this Weaver object may start.
void suspend() override
Suspend job execution.
void resume() override
Resume job queueing.
Weaver * weaver() override
The Weaver interface this state handles.
Thread represents a worker thread in a Queue's inventory.
Definition: thread.h:27
bool isIdle() const override
Is the weaver idle? The weaver is idle if no jobs are queued and no jobs are processed by the threads...
int queueLength() const override
Returns the number of pending jobs.
int maximumNumberOfThreads() const override
Get the maximum number of threads this Weaver may start.
void shutDown() override
Shut down the queue.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:09:38 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.