diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2018-01-22 18:43:04 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2018-01-29 17:13:05 +0300 |
commit | 1ac96603e167a67ce8a69c17624625d3b2fd3400 (patch) | |
tree | 001332020eb59efb77a55469f6110efaeab915a1 /lib | |
parent | 05373c2490da3c1bad1a7b7f45ffd0fa11558c1c (diff) |
Let mutex be initialized only once
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/metrics/concern.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/metrics/concern.rb b/lib/gitlab/metrics/concern.rb index d9d69d8026e..30b06131190 100644 --- a/lib/gitlab/metrics/concern.rb +++ b/lib/gitlab/metrics/concern.rb @@ -6,7 +6,7 @@ module Gitlab extend ActiveSupport::Concern included do - @@_metric_provider_mutex = Mutex.new + @@_metric_provider_mutex ||= Mutex.new @_metrics_provider_cache = {} end |