Skip to content

Instantly share code, notes, and snippets.

@peat
Created January 10, 2013 19:19
Show Gist options
  • Select an option

  • Save peat/4504943 to your computer and use it in GitHub Desktop.

Select an option

Save peat/4504943 to your computer and use it in GitHub Desktop.
friend_bucket = AWS::S3.new.buckets[ ... ]
follower_bucket = AWS::S3.new.buckets[ ... ]
friend_obj = friend_bucket.objects[ ... ]
follower_obj = follower_bucket.objects[ ... ]
threads = []
threads << Thread.new do
friend_obj.write( data, :content_type => ... )
end
threads << Thread.new do
follower_obj.write( data, :content_type => ... )
end
threads.each { |t| t.join }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment