Sha256: bd3a1687010ea52df3a27dcce34a7988f79ba5853db4b9850c7fe0788e3db911
Contents?: true
Size: 361 Bytes
Versions: 10
Compression:
Stored size: 361 Bytes
Contents
# frozen_string_literal: true # @api public # @since 0.4.0 class SmartCore::Engine::Lock # @return [void] # # @api public # @since 0.4.0 def initialize @lock = Mutex.new end # @param block [Block] # @return [Any] # # @api public # @since 0.4.0 def synchronize(&block) @lock.owned? ? yield : @lock.synchronize(&block) end end
Version data entries
10 entries across 10 versions & 1 rubygems