1 | /* -*- C++ -*- |
---|---|
2 | This file implements the DestructedState class. |
3 | |
4 | SPDX-FileCopyrightText: 2005-2013 Mirko Boehm <mirko@kde.org> |
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 | |
20 | void DestructedState::shutDown() |
21 | { |
22 | } |
23 | |
24 | Weaver *DestructedState::weaver() |
25 | { |
26 | return nullptr; |
27 | } |
28 | |
29 | const Weaver *DestructedState::weaver() const |
30 | { |
31 | return nullptr; |
32 | } |
33 | |
34 | void DestructedState::setMaximumNumberOfThreads(int) |
35 | { |
36 | } |
37 | |
38 | int DestructedState::maximumNumberOfThreads() const |
39 | { |
40 | return 0; |
41 | } |
42 | |
43 | int DestructedState::currentNumberOfThreads() const |
44 | { |
45 | return 0; |
46 | } |
47 | |
48 | void DestructedState::enqueue(const QList<JobPointer> &) |
49 | { |
50 | } |
51 | |
52 | bool DestructedState::dequeue(const JobPointer &) |
53 | { |
54 | return false; |
55 | } |
56 | |
57 | void DestructedState::dequeue() |
58 | { |
59 | } |
60 | |
61 | void DestructedState::finish() |
62 | { |
63 | } |
64 | |
65 | bool DestructedState::isEmpty() const |
66 | { |
67 | return true; |
68 | } |
69 | |
70 | bool DestructedState::isIdle() const |
71 | { |
72 | return true; |
73 | } |
74 | |
75 | int DestructedState::queueLength() const |
76 | { |
77 | return 0; |
78 | } |
79 | |
80 | void DestructedState::requestAbort() |
81 | { |
82 | } |
83 | |
84 | void DestructedState::suspend() |
85 | { |
86 | } |
87 | |
88 | void DestructedState::resume() |
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 | |
103 | StateId DestructedState::stateId() const |
104 | { |
105 | return Destructed; |
106 | } |
107 | |
108 | } |
109 |