blob: 8156829167f4fa462bc4fa615deedb205535a865 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "i_flush_token.h"
#include <atomic>
namespace search {
/*
* Class for checking if current flush task should be stopped.
*/
class FlushToken : public IFlushToken {
std::atomic<bool> _stop;
public:
FlushToken();
~FlushToken() override;
bool stop_requested() const noexcept override;
void request_stop() noexcept;
};
}
|