From: Craig Carey <research@ijs.co.nz>
Subject: Re: DYNAMIC ADA TASK CREATION?
Date: Thu, 19 Jun 2003 09:17:09 +1200
Date: 2003-06-19T09:17:09+12:00 [thread overview]
Message-ID: <39l1fv8ig2hr2bpsf786ao6a9it649bfnj@4ax.com> (raw)
In-Reply-To: bcqdof$dov$1@nemesis.news.tpi.pl
On Wed, 18 Jun 2003 21:15:02 +0200, "avram" <avram79@tlen.pl> 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
next prev parent reply other threads:[~2003-06-18 21:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-17 19:53 DYNAMIC ADA TASK CREATION? avram
2003-06-17 20:24 ` Simon Wright
2003-06-18 6:11 ` Robert I. Eachus
2003-06-18 9:20 ` Georg Bauhaus
2003-06-18 11:13 ` John McCabe
2003-06-18 12:43 ` John McCabe
2003-06-18 14:17 ` Georg Bauhaus
2003-06-19 5:07 ` Simon Wright
2003-06-19 6:05 ` Robert I. Eachus
2003-06-19 23:30 ` Jeffrey Carter
2003-06-18 19:15 ` avram
2003-06-18 21:17 ` Craig Carey [this message]
2003-06-20 18:56 ` avram
2003-06-21 13:06 ` Pascal Obry
2003-06-18 23:28 ` Robert I. Eachus
2003-06-19 5:09 ` Simon Wright
2003-06-19 6:39 ` Robert I. Eachus
2003-06-19 20:34 ` Simon Wright
2003-06-28 0:54 ` Matthew Heaney
2003-06-28 7:25 ` Robert I. Eachus
2003-06-30 7:35 ` Dmitry A. Kazakov
2003-06-30 15:01 ` Matthew Heaney
2003-07-01 7:19 ` Dmitry A. Kazakov
2003-07-01 14:21 ` Matthew Heaney
2003-07-02 12:05 ` Mário Amado Alves
2003-07-02 19:41 ` Simon Wright
2003-07-03 21:31 ` Mário Amado Alves
2003-07-03 9:53 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox