aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/frameworkimpl/thread/appkiller.h
blob: 4c6b25c9d2c8dcf69ab881d8494916a3b20c9d19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
 * @class storage::AppKiller
 * @ingroup thread
 * @brief A class for killing a storage process
 *
 * The app killer is a utility used by the deadlock detector to kill the
 * process. This is separated into this utility such that the deadlock
 * detector itself can use a fake killer to test the functionality.
 */

#pragma once

#include <memory>

namespace storage {

struct AppKiller {
    using UP = std::unique_ptr<AppKiller>;
    virtual ~AppKiller() = default;
    virtual void kill() = 0;
};

struct RealAppKiller : public AppKiller {
    void kill() override;
};

} // storage