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,1dc110ae98b0b7f1 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!s19g2000prg.googlegroups.com!not-for-mail From: gpriv@axonx.com Newsgroups: comp.lang.ada Subject: Re: Task question Date: Mon, 10 Dec 2007 14:29:17 -0800 (PST) Organization: http://groups.google.com Message-ID: <68057b42-eff2-4d97-ac7f-7aed6b69dff6@s19g2000prg.googlegroups.com> References: <31235206-1025-467c-8444-07a8eacc9b48@e6g2000prf.googlegroups.com> NNTP-Posting-Host: 151.196.71.114 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1197325757 24341 127.0.0.1 (10 Dec 2007 22:29:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 10 Dec 2007 22:29:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s19g2000prg.googlegroups.com; posting-host=151.196.71.114; posting-account=YaY8rAoAAAAAnFXOECY3BGVJsrvFJCgy User-Agent: G2/1.0 X-HTTP-Via: 1.1 SPARKS X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:18873 Date: 2007-12-10T14:29:17-08:00 List-Id: On Dec 10, 5:12 pm, shaunpatter...@gmail.com wrote: > Hey, > > What is the best / proper way to spawn a new task so that a > function call can > continue in the background.. like so: > > procedure Test is > begin > > -- Call a callback function that may take a long time > FuncPtr.all > > -- Continue other processing here > > end Test; > > Is there any way to encapsulate the callback function call in another > task WITHOUT making > the function -- the function called by funcptr.all -- a new task? > > Thanks > > -- > Shaun procedure test is procedure Test is task Labor; task body Labor is begin select delay 10.0; -- Give a timeout for your function to do the job then abort FuncPtr.all; end select; end Labor; begin null; end Test;