Sha256: afb00304e153e08ce85dd47f2dedba6526bdaa0f84596ea27a78209bd7bb470d
Contents?: true
Size: 463 Bytes
Versions: 9
Compression:
Stored size: 463 Bytes
Contents
require "concurrent/atomics" module EzConfig class Store def initialize @store = Concurrent::Map @lock = Concurrent::ReadWriteLock.new end def get(key) @lock.with_read_lock do @store[key] end end def all @lock.with_read_lock do @store.all end end def init(fs) @lock.with_write_lock do @store.replace(fs) @initialized.make_true end end end end
Version data entries
9 entries across 9 versions & 1 rubygems