Sha256: 384766e2354c9873c69e8e43359843f99f4e7fcec948a5366e1ead4f4f86417b
Contents?: true
Size: 394 Bytes
Versions: 6
Compression:
Stored size: 394 Bytes
Contents
module Cubism class CubicleBlockStore include Singleton def initialize @blocks = {} end def [](key) @blocks[key] end def []=(key, value) mutex.synchronize do @blocks[key] = value end end private def mutex @mutex ||= Mutex.new end end BlockStoreItem = Struct.new(:context, :block, keyword_init: true) end
Version data entries
6 entries across 6 versions & 1 rubygems