Remove locking in call-with-duration-metric

As I think this is unnecessary.
This commit is contained in:
Christopher Baines 2024-03-22 10:03:59 +00:00
parent d0bca34214
commit 59d19a657c

View file

@ -423,13 +423,6 @@ The metric with the name @var{metric-name} is fetched from the
@var{registry}, or created if it doesn't already exist. @var{registry}, or created if it doesn't already exist.
" "
(let* ((metric (let* ((metric
(or (metrics-registry-fetch-metric registry metric-name)
(call-with-blocked-asyncs
(lambda ()
(monitor
;; Check once more in case another thread has created
;; the metric while this thread was waiting for the
;; mutex
(or (metrics-registry-fetch-metric registry metric-name) (or (metrics-registry-fetch-metric registry metric-name)
(make-histogram-metric (make-histogram-metric
registry registry
@ -437,7 +430,7 @@ The metric with the name @var{metric-name} is fetched from the
#:buckets buckets #:buckets buckets
#:docstring docstring #:docstring docstring
#:labels labels #:labels labels
#:label-preset-values label-preset-values))))))) #:label-preset-values label-preset-values)))
(start-time (get-internal-real-time))) (start-time (get-internal-real-time)))
(call-with-values (call-with-values
thunk thunk