class ActiveSupport::Concurrency::ShareLock

def sharing

Execute the supplied block while holding the Share lock.
def sharing
  start_sharing
  begin
    yield
  ensure
    stop_sharing
  end
end