ThreadWeaver

shuttingdownstate.cpp
1 /* -*- C++ -*-
2  This file implements 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.cpp 30 2005-08-16 16:16:04Z mirko $
9 */
10 
11 #include "shuttingdownstate.h"
12 
13 namespace ThreadWeaver
14 {
15 ShuttingDownState::ShuttingDownState(QueueSignals *weaver)
16  : WeaverImplState(weaver)
17 {
18 }
19 
21 {
22 }
23 
25 {
26  // ignored: when shutting down, we do not return to the suspended state
27 }
28 
30 {
31  // ignored: when shutting down, we do not return from the suspended state
32 }
33 
35 {
36  Q_UNUSED(wasBusy) // except in Q_ASSERT
37  Q_ASSERT(wasBusy == false);
38  return JobPointer(); // tell threads to exit
39 }
40 
42 {
43  // immediately return here
44 }
45 
47 {
48  return ShuttingDown;
49 }
50 
51 }
void resume() override
Resume job processing.
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
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 Wed Sep 27 2023 04:07:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.