ThreadWeaver

inconstructionstate.h
1/* -*- C++ -*-
2 This file declares the InConstructionState 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: InConstructionState.h 32 2005-08-17 08:38:01Z mirko $
9*/
10
11#ifndef InConstructionState_H
12#define InConstructionState_H
13
14#include "weaverimplstate.h"
15
16namespace ThreadWeaver
17{
18class Weaver;
19class Queue;
20
21/** InConstructionState handles the calls to the Weaver
22 object until the constructor has finished.
23 */
24class InConstructionState : public WeaverImplState
25{
26public:
27 explicit InConstructionState(QueueSignals *weaver);
28 /** Suspend job processing. */
29 void suspend() override;
30 /** Resume job processing. */
31 void resume() override;
32 /** Assign a job to an idle thread. */
33 JobPointer applyForWork(Thread *th, bool wasBusy) override;
34 /** reimpl */
35 StateId stateId() const override;
36};
37
38}
39
40#endif // InConstructionState_H
StateId stateId() const override
reimpl
void suspend() override
Suspend job processing.
void resume() override
Resume job processing.
JobPointer applyForWork(Thread *th, bool wasBusy) override
Assign a job to an idle thread.
QueueSignals declares the Qt signals shared by the Queue and Weaver classes.
Queue implements a ThreadWeaver job queue.
Definition queue.h:36
Thread represents a worker thread in a Queue's inventory.
Definition thread.h:28
Weaver * weaver() override
Provide correct return type for WeaverImpl states.
A Weaver manages worker threads.
Definition weaver.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:57:09 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.