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 */
22class SuspendingState : public WeaverImplState
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
41

source code of threadweaver/src/suspendingstate.h