Sha256: f04718fe92c5b76c733140307891f3fbe394f89d691fb73ff51acc31476d88ef
Contents?: true
Size: 361 Bytes
Versions: 20
Compression:
Stored size: 361 Bytes
Contents
# frozen_string_literal: true module Sequel::Plugins::WithLock module InstanceMethods # Execute block with lock # # @yield def with_lock return yield if @__locked @__locked = true begin db.transaction do lock! yield end ensure @__locked = false end end end end
Version data entries
20 entries across 20 versions & 1 rubygems