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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e2e6547249e6f9d1 X-Google-Attributes: gid103376,public From: "wiljan" Subject: Re: How to wait for task completion Date: 1996/09/17 Message-ID: <01bba4c7$fa9f4650$2d208b82@wd>#1/1 X-Deja-AN: 181179464 references: <01bba2e8$c45aad90$35208b82@wd> <01bba3f7$ee398fe0$10208b82@wd> organization: Philips Electronics N.V. newsgroups: comp.lang.ada Date: 1996-09-17T00:00:00+00:00 List-Id: 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