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/*
20 * SuspendingState is the state after suspend() has been called, but
21 * before all threads finished executing the current job and blocked.
22 */
23class SuspendingState : public WeaverImplState
24{
25public:
26 explicit SuspendingState(Weaver *weaver);
27 /*! Suspend job processing. */
28 void suspend() override;
29 /*! Resume job processing. */
30 void resume() override;
31 /*! Assign a job to an idle thread. */
32 JobPointer applyForWork(Thread *th, bool wasBusy) override;
33 /*! Overload. */
34 void activated() override;
35 /*! reimpl */
36 StateId stateId() const override;
37};
38
39}
40
41#endif // SuspendingState_H
42

source code of threadweaver/src/suspendingstate.h