Skip to content

Commit

Permalink
Resolved a thready-safety issue with AWS::Core::Configuration.
Browse files Browse the repository at this point in the history
References #90
  • Loading branch information
trevorrowe committed Mar 21, 2013
1 parent 018619a commit 2f47346
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/aws/core/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,10 @@ def add_option_with_needs name, needs, &create_block
needed = needs.inject({}) {|h,need| h.merge(need => send(need)) }

unless @created.key?(name) and @created[name][:needed] == needed
@created[name] = {}
@created[name][:object] = create_block.call(self,needed)
@created[name][:needed] = needed
created = {}
created[:object] = create_block.call(self,needed)
created[:needed] = needed
@created[name] = created
end

@created[name][:object]
Expand Down

0 comments on commit 2f47346

Please sign in to comment.