blob: ed170a1cd333c96bd90240fe2d4f26fc9bdab717 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "updatehook.h"
namespace metrics {
MetricLockGuard::MetricLockGuard(std::mutex & mutex)
: _guard(mutex)
{}
bool
MetricLockGuard::owns(const std::mutex & mutex) const {
return (_guard.mutex() == &mutex) && _guard.owns_lock();
}
MetricLockGuard::~MetricLockGuard() = default;
}
|