Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Maes <jaspermaes.jm@gmail.com>2018-07-28 16:47:26 +0300
committerJasper Maes <jaspermaes.jm@gmail.com>2018-07-29 16:12:52 +0300
commit3091897bf94789fb8d7d79439c44c3ec005e627e (patch)
tree64b6006d4458c830c33ee00b8e8ce55e82932280 /lib/gitlab/gpg.rb
parent87f03f01735fb4b6dbef2e4bf625cf2546523a4e (diff)
Permit concurrent loads in gpg keychain mutex
Diffstat (limited to 'lib/gitlab/gpg.rb')
-rw-r--r--lib/gitlab/gpg.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/gitlab/gpg.rb b/lib/gitlab/gpg.rb
index a4263369269..8a91e034377 100644
--- a/lib/gitlab/gpg.rb
+++ b/lib/gitlab/gpg.rb
@@ -71,8 +71,16 @@ module Gitlab
if MUTEX.locked? && MUTEX.owned?
optimistic_using_tmp_keychain(&block)
else
- MUTEX.synchronize do
- optimistic_using_tmp_keychain(&block)
+ if Gitlab.rails5?
+ ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
+ MUTEX.synchronize do
+ optimistic_using_tmp_keychain(&block)
+ end
+ end
+ else
+ MUTEX.synchronize do
+ optimistic_using_tmp_keychain(&block)
+ end
end
end
end