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,FREEMAIL_FROM, 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-20 11:57:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!news.nask.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: "avram" Newsgroups: comp.lang.ada Subject: Re: DYNAMIC ADA TASK CREATION? Date: Fri, 20 Jun 2003 20:56:47 +0200 Organization: tp.internet - http://www.tpi.pl/ Message-ID: References: <3EF0026E.2050309@attbi.com> <39l1fv8ig2hr2bpsf786ao6a9it649bfnj@4ax.com> NNTP-Posting-Host: pi78.warszawa.cvx.ppp.tpnet.pl X-Trace: nemesis.news.tpi.pl 1056135453 25350 213.76.104.78 (20 Jun 2003 18:57:33 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Fri, 20 Jun 2003 18:57:33 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Xref: archiver1.google.com comp.lang.ada:39499 Date: 2003-06-20T20:56:47+02:00 List-Id: Thanx, but i think that the loop is not efficient. I mean this is an active waiting, so my main process use CPU without sense. I would like to know if there is way to deallocation of a memory without active waiting. avram Uzytkownik "Craig Carey" napisal w wiadomosci news:39l1fv8ig2hr2bpsf786ao6a9it649bfnj@4ax.com... > 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 >