[AWS] Starting a Task in a Callback and Immediately Returning
Graham Stark
graham.stark at virtual-worlds.biz
Fri Nov 14 14:42:59 CET 2008
Hi,
Apologies if this is obvious, but I can't figure it out. Also apologies
for posting this both here and in the comp.lang.ada group.
Using AWS, I want a user to be able to submit a job via a web page that
might run for 10-20 minutes, and have the server duly start it but
respond immediately with a reply like "your job has started" (as a web
page).
So, something like:
function Web_Callback (request : in AWS.Status.Data) return
AWS.Response.Data
begin
Start_Long_Job( ... );
return "your job has just started";
end Web_Callback;
Can I do this using Ada's tasking facilities? So far as I understand
them, all the Tasking examples I've looked at would have the return
executed only after Start_Long_Job has completed. Is that right? But,
obviously, you can't wait 10 minutes to reply to a web request.
Or is there some other way of doing this?
Graham
More information about the AWS
mailing list