ThreadWeaver

suspendedstate.h
1/* -*- C++ -*-
2 This file declares the SuspendedState 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: SuspendedState.h 32 2005-08-17 08:38:01Z mirko $
9*/
10
11#ifndef SuspendedState_H
12#define SuspendedState_H
13
14#include "weaver.h"
15#include "weaverimplstate.h"
16
17namespace ThreadWeaver
18{
19/** In SuspendedState, jobs are queued, but will not be executed. All
20 * thread remains blocked. */
22{
23public:
24 explicit SuspendedState(Weaver *weaver);
25 /** Suspend job processing. */
26 void suspend() override;
27 /** Resume job processing. */
28 void resume() override;
29 /** Assign a job to an idle thread. */
30 JobPointer applyForWork(Thread *th, bool wasBusy) override;
31 /** reimpl */
32 StateId stateId() const override;
33};
34
35}
36
37#endif // SuspendedState_H
In SuspendedState, jobs are queued, but will not be executed.
void suspend() override
Suspend job processing.
void resume() override
Resume job processing.
StateId stateId() const override
reimpl
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.
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-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:02:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.