summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-01-24 17:35:59 +0100
committerTor Egge <Tor.Egge@online.no>2022-01-24 17:35:59 +0100
commit6f2271d971d428aad93bfa9dec3fe291c2d61249 (patch)
tree1c09b000fe77f2b744b13dbb8191e6cbb1bbbe29
parente114e209caed815a3e511e78b26e0894c6cec7c1 (diff)
Don't allow pending ops in DynamicOperationThrottler when destroying instance.
-rw-r--r--vespalib/src/vespa/vespalib/util/shared_operation_throttler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/util/shared_operation_throttler.cpp b/vespalib/src/vespa/vespalib/util/shared_operation_throttler.cpp
index e91be68a671..dd790bcaa0a 100644
--- a/vespalib/src/vespa/vespalib/util/shared_operation_throttler.cpp
+++ b/vespalib/src/vespa/vespalib/util/shared_operation_throttler.cpp
@@ -244,7 +244,10 @@ DynamicOperationThrottler::DynamicOperationThrottler(const DynamicThrottleParams
{
}
-DynamicOperationThrottler::~DynamicOperationThrottler() = default;
+DynamicOperationThrottler::~DynamicOperationThrottler()
+{
+ assert(_pending_ops == 0u);
+}
bool
DynamicOperationThrottler::has_spare_capacity_in_active_window() noexcept