1/* -*- C++ -*-
2 This file implements the ShuttingDownState 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: ShuttingDownState.cpp 30 2005-08-16 16:16:04Z mirko $
9*/
10
11#include "shuttingdownstate.h"
12
13namespace ThreadWeaver
14{
15ShuttingDownState::ShuttingDownState(QueueSignals *weaver)
16 : WeaverImplState(weaver)
17{
18}
19
20void ShuttingDownState::shutDown()
21{
22}
23
24void ShuttingDownState::suspend()
25{
26 // ignored: when shutting down, we do not return to the suspended state
27}
28
29void ShuttingDownState::resume()
30{
31 // ignored: when shutting down, we do not return from the suspended state
32}
33
34JobPointer ShuttingDownState::applyForWork(Thread *, bool wasBusy)
35{
36 Q_UNUSED(wasBusy) // except in Q_ASSERT
37 Q_ASSERT(wasBusy == false);
38 return JobPointer(); // tell threads to exit
39}
40
41void ShuttingDownState::waitForAvailableJob(Thread *)
42{
43 // immediately return here
44}
45
46StateId ShuttingDownState::stateId() const
47{
48 return ShuttingDown;
49}
50
51}
52

source code of threadweaver/src/shuttingdownstate.cpp