3 # Like MemoryStore, but thread-safe.
4 class SynchronizedMemoryStore
< MemoryStore
10 def fetch(key
, options
= {})
11 @guard.synchronize
{ super }
14 def read(name
, options
= nil)
15 @guard.synchronize
{ super }
18 def write(name
, value
, options
= nil)
19 @guard.synchronize
{ super }
22 def delete(name
, options
= nil)
23 @guard.synchronize
{ super }
26 def delete_matched(matcher
, options
= nil)
27 @guard.synchronize
{ super }
30 def exist
?(name
,options
= nil)
31 @guard.synchronize
{ super }
34 def increment(key
, amount
= 1)
35 @guard.synchronize
{ super }
38 def decrement(key
, amount
= 1)
39 @guard.synchronize
{ super }
43 @guard.synchronize
{ super }