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.4 required=5.0 tests=BAYES_00,SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,51359402da60c472 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-18 14:17:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.clear.net.nz!news.clear.net.nz.POSTED!not-for-mail NNTP-Posting-Date: Wed, 18 Jun 2003 16:17:00 -0500 From: Craig Carey Newsgroups: comp.lang.ada Subject: Re: DYNAMIC ADA TASK CREATION? Date: Thu, 19 Jun 2003 09:17:09 +1200 Message-ID: <39l1fv8ig2hr2bpsf786ao6a9it649bfnj@4ax.com> References: <3EF0026E.2050309@attbi.com> X-Newsreader: Forte Agent 1.92/32.572 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Organization: Customer of Mercury Telecommunications Ltd Cache-Post-Path: drone5.qsi.net.nz!unknown@tnt2-201.quicksilver.net.nz X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) X-Original-NNTP-Posting-Host: drone5-svc-skyt.qsi.net.nz X-Original-Trace: 19 Jun 2003 09:16:58 +1200, drone5-svc-skyt.qsi.net.nz NNTP-Posting-Host: 203.97.37.6 X-Trace: sv3-aAinuhJ9rWveWWEG7oSwBiFKWKacfKXh9lGoRlQb1u/PTzVMWsTJCeJ4OlibWRi7abU79pjRnedRqwU!9RdPM/f7Juob+khJvTfwuHbU9h4jeH+BXZHP+rmbxlaUN/o/GKaG65yfyfvBhoiQ6PDvSkZ3QQ/f!333Faeo= X-Complaints-To: Complaints to abuse@clear.net.nz X-DMCA-Complaints-To: Complaints to abuse@clear.net.nz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:39414 Date: 2003-06-19T09:17:09+12:00 List-Id: On Wed, 18 Jun 2003 21:15:02 +0200, "avram" wrote: > Than[s] very much. I have one more question. >What about task memory deallocation. How to wait untill task ends? There was a solution posted in comp.lang.ada which is replicated: On 11 May 2003 17:35:18 +0200, in comp.lang.ada you Pascal Obry wrote: >[...] The delay could still not be enough. What I usually do >is loop until 'Terminated is true. ... > for K in 1 .. 20_000 loop > X := new A.Tt; -- [Create a new task] > N := N + 1; > X.The_End; > > loop > exit when X'Terminated; > delay 1.0E-30; > end loop; > > Free (X); > end loop; > The memory recovery can be 0% efficient, or 100% efficient depending on how the test is done (at least, for the ObjectAda and GNAT compilers). Craig Carey