forked from Deuxfleurs/tricot
One more comment regarding InFlightGuard
This commit is contained in:
parent
69302267cc
commit
6988c1dd2b
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,8 @@ struct HttpsMetrics {
|
|||
request_proxy_duration: metrics::Histogram<f64>,
|
||||
}
|
||||
|
||||
// "RAII guard" that ensures the in-flight counter is decremented in all cases
|
||||
// (https://rust-unofficial.github.io/patterns/patterns/behavioural/RAII.html)
|
||||
struct InFlightGuard<'a, 'b> {
|
||||
metrics: &'a HttpsMetrics,
|
||||
tags: &'b [KeyValue],
|
||||
|
|
Loading…
Add table
Reference in a new issue