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/*
20 * In SuspendedState, jobs are queued, but will not be executed. All thread remains blocked.
21 */
22class SuspendedState : public WeaverImplState
23{
24public:
25 explicit SuspendedState(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 /*! reimpl */
33 StateId stateId() const override;
34};
35
36}
37
38#endif // SuspendedState_H
39

source code of threadweaver/src/suspendedstate.h