ThreadWeaver 5.109.0
shuttingdownstate.h
1/* -*- C++ -*-
2 This file declares the ShuttingDownState 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: ShuttingDownState.h 32 2005-08-17 08:38:01Z mirko $
9*/
10
11#ifndef ShuttingDownState_H
12#define ShuttingDownState_H
13
14#include "weaverimplstate.h"
15
16namespace ThreadWeaver
17{
18class Queue;
19
24{
25public:
27
29 void shutDown() override;
31 void suspend() override;
33 void resume() override;
35 JobPointer applyForWork(Thread *th, bool wasBusy) override;
37 void waitForAvailableJob(Thread *th) override;
39 StateId stateId() const override;
40};
41
42}
43
44#endif // ShuttingDownState_H
QueueSignals declares the Qt signals shared by the Queue and Weaver classes.
Definition queuesignals.h:24
ShuttingDownState is enabled when the Weaver destructor is entered.
Definition shuttingdownstate.h:24
StateId stateId() const override
reimpl
void waitForAvailableJob(Thread *th) override
Wait (by suspending the calling thread) until a job becomes available.
void shutDown() override
Shut down the queue.
void resume() override
Resume job processing.
void suspend() override
Suspend job processing.
JobPointer applyForWork(Thread *th, bool wasBusy) override
Assign a job to an idle thread.
Thread represents a worker thread in a Queue's inventory.
Definition thread.h:28
Base class for all WeaverImpl states.
Definition weaverimplstate.h:21
Weaver * weaver() override
Provide correct return type for WeaverImpl states.