-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
The following use cases could/should be supported in the end:
Synchronous, like it is now, eg:
results = @sdb.select("select * from sdb")
results.each do |r|
# do something
end
EM async, eg:
@sdb.select("select * from sdb") do |results|
results.each do |r|
# do something
end
end
Concur style, eg:
results_future = executor.execute do
@sdb.select("select * from sdb")
end
# at some point when the results are needed
results = results_future.get
results.each do |r|
# do something
end
OR another concur style, initializing with executor
@sdb = Aws::SdbInterface.new(TestCredentials.aws_access_key_id, TestCredentials.aws_secret_access_key, :executor=>executor)
then:
results_future = @sdb.select("select * from sdb")
# at some point when the results are needed
results = results_future.get
results.each do |r|
# do something
end
OR to mix sync with async:
results_future = @sdb.select("select * from sdb", :executor=>executor)