ThreadWeaver

shuttingdownstate.h
1 /* -*- C++ -*-
2  This file declares the ShuttingDownState class.
3 
4  SPDX-FileCopyrightText: 2005-2013 Mirko Boehm <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 
8  $Id: ShuttingDownState.h 32 2005-08-17 08:38:01Z mirko $
9 */
10 
11 #ifndef ShuttingDownState_H
12 #define ShuttingDownState_H
13 
14 #include "weaverimplstate.h"
15 
16 namespace ThreadWeaver
17 {
18 class Queue;
19 
20 /** ShuttingDownState is enabled when the Weaver destructor is entered. It
21  * prevents threads from still accessing queue management methods, and new jobs being queued.
22  */
24 {
25 public:
27 
28  /** Shut down the queue. */
29  void shutDown() override;
30  /** Suspend job processing. */
31  void suspend() override;
32  /** Resume job processing. */
33  void resume() override;
34  /** Assign a job to an idle thread. */
35  JobPointer applyForWork(Thread *th, bool wasBusy) override;
36  /** Wait (by suspending the calling thread) until a job becomes available. */
37  void waitForAvailableJob(Thread *th) override;
38  /** reimpl */
39  StateId stateId() const override;
40 };
41 
42 }
43 
44 #endif // ShuttingDownState_H
void resume() override
Resume job processing.
Base class for all WeaverImpl states.
void suspend() override
Suspend job processing.
void waitForAvailableJob(Thread *th) override
Wait (by suspending the calling thread) until a job becomes available.
StateId stateId() const override
reimpl
Weaver * weaver() override
Provide correct return type for WeaverImpl states.
ShuttingDownState is enabled when the Weaver destructor is entered.
QueueSignals declares the Qt signals shared by the Queue and Weaver classes.
Definition: queuesignals.h:23
JobPointer applyForWork(Thread *th, bool wasBusy) override
Assign a job to an idle thread.
Thread represents a worker thread in a Queue's inventory.
Definition: thread.h:27
void shutDown() override
Shut down the queue.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:09:38 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.