blob: 8deb67efad67c06605b8a2cda829725a9d90f192 (
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
30
31
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "ipendinglidtracker.h"
namespace proton {
IPendingLidTracker::Token::Token()
: _tracker(nullptr),
_lid(0u)
{}
IPendingLidTracker::Token::Token(uint32_t lid, IPendingLidTracker &tracker)
: _tracker(&tracker),
_lid(lid)
{}
IPendingLidTracker::Token::~Token() {
if (_tracker != nullptr) {
_tracker->consume(_lid);
}
}
void
ILidCommitState::waitComplete(uint32_t lid) const {
waitState(State::COMPLETED, lid);
}
void
ILidCommitState::waitComplete(const LidList & lids) const {
waitState(State::COMPLETED, lids);
}
}
|