blob: 753ef922951a13c41cc21fa1034a4cc76ddb9dcf (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "flush_token.h"
namespace search {
FlushToken::FlushToken()
: _stop(false)
{
}
FlushToken::~FlushToken() = default;
bool
FlushToken::stop_requested() const noexcept
{
return _stop.load(std::memory_order_relaxed);
}
void
FlushToken::request_stop() noexcept
{
_stop.store(true, std::memory_order_relaxed);
}
}
|