ThreadWeaver

suspendingstate.h
1 /* -*- C++ -*-
2  This file declares the SuspendingState class.
3 
4  SPDX-FileCopyrightText: 2005-2013 Mirko Boehm <[email protected]>
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 
17 namespace 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 {
24 public:
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
Base class for all WeaverImpl states.
StateId stateId() const override
reimpl
A Weaver manages worker threads.
Definition: weaver.h:34
Weaver * weaver() override
Provide correct return type for WeaverImpl states.
void suspend() override
Suspend job processing.
void activated() override
Overload.
Thread represents a worker thread in a Queue's inventory.
Definition: thread.h:27
SuspendingState is the state after suspend() has been called, but before all threads finished executi...
JobPointer applyForWork(Thread *th, bool wasBusy) override
Assign a job to an idle thread.
void resume() override
Resume job processing.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 04:01:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.