comp.lang.ada
 help / color / mirror / Atom feed
From: "wiljan" <W.Derks@nl.cis.philips.com>
Subject: Re: How to wait for task completion
Date: 1996/09/17
Date: 1996-09-17T00:00:00+00:00	[thread overview]
Message-ID: <01bba4c7$fa9f4650$2d208b82@wd> (raw)
In-Reply-To: qw67mpth8zi.fsf@gargantua.enst.fr


Hello Samuel,

You wrote:

> So you should have a look at the generic package Ada.Task_Attributes:
> it lets you attach special attributes onto task running on your
> system. If you attach an attribute of a controlled type to your task,
> then it will be destroyed (this the Finalization procedure called)
> whenever the task is completed.
I am aware of the existance of this package. Note that I want to be able to
also cleanup the space that the task object itself uses.
Thus when I have a pointer to some task type there is actually some space
allocated for the task itself. I want to free that space also. Normally
that space
is simply allocated with a new.
Note that whatever you do, the task itself can not do that because it is
very dangeraous to do that. After disposal the space might still be
refferenced
by the task itself.
So my question is how to make this program work:
   task type xtask;
   task body xtask is
   begin
       null;
   end xtask;
   type pxtask is access xtask;

   for i in integer'range loop
      declare p:pxtask:=new xtask;
   end loop;
The program can be made working when doing a lot of adminstrating
on the pointers to the objects created in the main program.
I actually want to deallalocate them in the task itself when they complete.

Greetings,

Wiljan






  reply	other threads:[~1996-09-17  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-15  0:00 How to wait for task completion wiljan
1996-09-15  0:00 ` David C. Hoos, Sr.
1996-09-20  0:00   ` Stephen & Tammy House
1996-09-15  0:00 ` Samuel Tardieu
1996-09-16  0:00   ` wiljan
1996-09-17  0:00     ` Samuel Tardieu
1996-09-17  0:00       ` wiljan [this message]
1996-09-17  0:00       ` Norman H. Cohen
1996-09-17  0:00         ` wiljan
1996-09-18  0:00           ` Tucker Taft
1996-09-18  0:00             ` Norman H. Cohen
1996-09-17  0:00     ` Ted Dennison
1996-09-18  0:00   ` Jon S Anthony
1996-09-16  0:00 ` Jon S Anthony
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox