File indexing completed on 2024-04-21 04:01:27

0001 /* -*- C++ -*-
0002     This file declares the InConstructionState class.
0003 
0004     SPDX-FileCopyrightText: 2005-2013 Mirko Boehm <mirko@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 
0008     $Id: InConstructionState.h 32 2005-08-17 08:38:01Z mirko $
0009 */
0010 
0011 #ifndef InConstructionState_H
0012 #define InConstructionState_H
0013 
0014 #include "weaverimplstate.h"
0015 
0016 namespace ThreadWeaver
0017 {
0018 class Weaver;
0019 class Queue;
0020 
0021 /** InConstructionState handles the calls to the Weaver
0022         object until the constructor has finished.
0023     */
0024 class InConstructionState : public WeaverImplState
0025 {
0026 public:
0027     explicit InConstructionState(QueueSignals *weaver);
0028     /** Suspend job processing. */
0029     void suspend() override;
0030     /** Resume job processing. */
0031     void resume() override;
0032     /** Assign a job to an idle thread. */
0033     JobPointer applyForWork(Thread *th, bool wasBusy) override;
0034     /** reimpl */
0035     StateId stateId() const override;
0036 };
0037 
0038 }
0039 
0040 #endif // InConstructionState_H