1/* -*- C++ -*-
2 This file declares 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.h 32 2005-08-17 08:38:01Z mirko $
9*/
10
11#ifndef DestructedState_H
12#define DestructedState_H
13
14#include "weaverimplstate.h"
15
16namespace ThreadWeaver
17{
18class QueueSignals;
19
20/** DestructedState is only active after the thread have been destroyed by
21 * the destructor, but before superclass destructors have finished.
22 */
23class DestructedState : public WeaverImplState
24{
25public:
26 explicit DestructedState(QueueSignals *weaver);
27 void shutDown() override;
28 Weaver *weaver() override;
29 const Weaver *weaver() const override;
30 void setMaximumNumberOfThreads(int cap) override;
31 int maximumNumberOfThreads() const override;
32 int currentNumberOfThreads() const override;
33 void enqueue(const QList<JobPointer> &job) override;
34 bool dequeue(const JobPointer &job) override;
35 void dequeue() override;
36 void finish() override;
37 bool isEmpty() const override;
38 bool isIdle() const override;
39 int queueLength() const override;
40 void requestAbort() override;
41 void suspend() override;
42 void resume() override;
43 JobPointer applyForWork(Thread *th, bool wasBusy) override;
44 void waitForAvailableJob(Thread *th) override;
45 StateId stateId() const override;
46};
47
48}
49
50#endif // DestructedState_H
51

source code of threadweaver/src/destructedstate.h