Hi. I'm not sure if I'm using this right, but shouldn't these be handled asyncrhonously?
require 'angelo'
class HelloApp < Angelo::Base
task :do_stuff do
time_of_request = Time.now
Kernel.sleep 10
time_after = Time.now
"Hello to you, too. #{time_of_request}- #{time_after}"
end
get "/" do
puts "processing"
f = future :do_stuff
f.value
end
end
HelloApp.run!
When I hit it, they are usually serviced 10 sec apart. Occasionally one gets serviced w/in 3 sec.
Perhaps I did not use future correctly? Thank you