Skip to content

Eventmachine support #66

@treeder

Description

@treeder

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions