File: safe_sync_jruby.rb

package info (click to toggle)
ruby-lru-redux 1.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: ruby: 615; makefile: 4
file content (17 lines) | stat: -rw-r--r-- 276 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module LruRedux
  module Util
    module SafeSync
      def getset(key, &block)
        synchronize do
          super(key, &block)
        end
      end

      def fetch(key, &block)
        synchronize do
          super(key, &block)
        end
      end
    end
  end
end