ThreadWeaver

suspendingstate.h
1/* -*- C++ -*-
2 This file declares the SuspendingState 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: SuspendingState.h 32 2005-08-17 08:38:01Z mirko $
9*/
10
11#ifndef SuspendingState_H
12#define SuspendingState_H
13
14#include "weaver.h"
15#include "weaverimplstate.h"
16
17namespace ThreadWeaver
18{
19/** SuspendingState is the state after suspend() has been called, but
20 * before all threads finished executing the current job and blocked.
21 */
23{
24public:
25 explicit SuspendingState(Weaver *weaver);
26 /** Suspend job processing. */
27 void suspend() override;
28 /** Resume job processing. */
29 void resume() override;
30 /** Assign a job to an idle thread. */
31 JobPointer applyForWork(Thread *th, bool wasBusy) override;
32 /** Overload. */
33 void activated() override;
34 /** reimpl */
35 StateId stateId() const override;
36};
37
38}
39
40#endif // SuspendingState_H
SuspendingState is the state after suspend() has been called, but before all threads finished executi...
StateId stateId() const override
reimpl
void suspend() override
Suspend job processing.
JobPointer applyForWork(Thread *th, bool wasBusy) override
Assign a job to an idle thread.
void resume() override
Resume job processing.
void activated() override
Overload.
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 Mon Nov 18 2024 12:09:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.