comp.lang.ada
 help / color / mirror / Atom feed
* Starting a Task and Immediately Returning
@ 2008-11-14 13:26 Graham Stark
  2008-11-14 13:41 ` Maciej Sobczak
  0 siblings, 1 reply; 5+ messages in thread
From: Graham Stark @ 2008-11-14 13:26 UTC (permalink / raw)


Apologies if this is obvious, but I can't figure it out.

I'm doing some work with the Ada Web Server. 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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-11-15 15:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-14 13:26 Starting a Task and Immediately Returning Graham Stark
2008-11-14 13:41 ` Maciej Sobczak
2008-11-14 15:13   ` Jean-Pierre Rosen
2008-11-15 12:04     ` Samuel Tardieu
2008-11-15 15:53       ` sjw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox