You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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)
The text was updated successfully, but these errors were encountered:
@rkononov I just pushed some changes where I'm trying to use a second EventMachine adapter using concur. See test_performance.rb for usage, but the idea is to be able to queue up a bunch of requests using the concur executor pattern and then get the results from the futures so it's not so callback spaghetti'ish (to the user at least), it's definitely spaghetti going on behind the scenes right now though ;). You'll need to get the latest concur code and build/install the gem to get it working.
The following use cases could/should be supported in the end:
Synchronous, like it is now, eg:
EM async, eg:
Concur style, eg:
OR another concur style, initializing with executor
then:
OR to mix sync with async:
The text was updated successfully, but these errors were encountered: