From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cd2c81bea5127375,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!h23g2000prf.googlegroups.com!not-for-mail From: Graham Stark Newsgroups: comp.lang.ada Subject: Starting a Task and Immediately Returning Date: Fri, 14 Nov 2008 05:26:06 -0800 (PST) Organization: http://groups.google.com Message-ID: <2ec689f1-8dc6-4cd8-b7f8-d0b7311317cc@h23g2000prf.googlegroups.com> NNTP-Posting-Host: 86.133.80.99 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1226669166 25791 127.0.0.1 (14 Nov 2008 13:26:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 14 Nov 2008 13:26:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h23g2000prf.googlegroups.com; posting-host=86.133.80.99; posting-account=04rmagoAAABZ9PN7u3MdbKIs6DPG57E- User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; x86_64 Linux; en_GB; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2673 Date: 2008-11-14T05:26:06-08:00 List-Id: 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