[rubygems/rubygems] Use a mutex around Checksum::Store @store access

Not wrapping to_lock since access to it is single threaded and
read-only at the time of writing the lockfile.

https://github.com/rubygems/rubygems/commit/3b53aa1b12
This commit is contained in:
Martin Emde 2023-12-14 12:42:15 -08:00 committed by Hiroshi SHIBATA
parent 5b8e685877
commit 56804ddd2b

View File

@ -189,7 +189,6 @@ module Bundler
# that contain the same gem with different checksums.
def replace(spec, checksum)
return unless checksum
lock_name = spec.name_tuple.lock_name
@store_mutex.synchronize do
existing = fetch_checksum(lock_name, checksum.algo)