class AWS::Flow::Templates::ResultWorker::SynchronizedHash
Wrapper around a ruby {Hash} to provide synchronization around making changes to the encapsulated hash.
Attributes
hash[R]
Public Class Methods
new()
click to toggle source
# File lib/aws/templates/result.rb, line 16 def initialize @semaphore = Mutex.new @hash = {} end
Public Instance Methods
method_missing(method, *args)
click to toggle source
# File lib/aws/templates/result.rb, line 21 def method_missing(method, *args) # Not very efficient but ruby structures are not thread # safe in MRI. @semaphore.synchronize{ return @hash.send(method, *args) } end